I want to know how boot process is done in angular. Which file is executed first and when execution started js file is executed first and execution of html body is started?
1 Answer
Placing the script tag at the bottom of the page improves app load time because the HTML loading is not blocked by loading of the angular.js script.
AngularJS does not need to be placed in the HEAD, and actually you normally shouldn't, since this would block loading the HTML.
However, when you load AngularJS at the bottom of the page, you will need to use ng-cloak or ng-bind to avoid the "flash of uncompiled content". Note that you only need to use ng-cloak/ng-bind on your "index.html" page. When ng-include or ng-view or other Angular constructs are used to pull in additional content after the initial page load, that content will be compiled by Angular before it is displayed.