The jquery and Angularjs framework was used in the project to locate a problem recently because jquery ready was written before the ANGULARJS controller, causing the jquery selector to fail to select the required element (due to Angularjs The controller has not been initialized, and the DOM element's class attribute has not been added. So it leads to a problem, jquery and angularjs who run the problem first. Of course, the code we write does not depend on the order in which the code that relies on some order is more prone to error.
The output results are as follows:
I am First execute.first jquery ready.second jquery ready.jquery ready right before angular.angular ready.beginin angular Controller.beginin angular controller.endangular ready.endjquery ready right after angular.
can see: JQuery ready and ANGULARJS controller are all running after Domready, who first run.
(16) The running order problem of JQuery ready and ANGULARJS Controller