Tuesday, March 22, 2016

Angular JS - What is Bootstrap

recommended path for integrating the Angular JS is to place the script tag at the bottom of the page. Placing script tags at the end of the page improves app load time because the HTML loading is not blocked by loading of the angular.js script. We can get the latest bits from http://code.angularjs.org.

Place ng-app to the root of your application, typically on the tag if you want angular to auto-bootstrap your application

There are two types of initialization

1. Automatic initialization 
Angular JS automatically initialzes DOMContentLoaded event or when the angular script is evaluated and if at that time if document.readyState is set to complete. At this point angular js looks for ng-app directive and does the below 

a. load the module associated with the directive 
b. create the application injector
c. compile the DOM treating the ng-app directive as the root of compilation. this allows to tell it to treat only a portion of DOM as the angular application 

I can add :{{1+2}}.

No comments:

Post a Comment