AngularJS in HEAD vs BODY

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.

See also https://stackoverflow.com/a/14076004/215945

Leave a Comment