Question

I'm reading a book called Angularjs . In it this is stated "Angular traverses the template and looks for directives and bindings. This results in registration of listeners and DOM manipulation, as well as fetching initial data from the server. The end result of this work is that the app is bootstrapped and the template is converted into a view."

What is meant by "App is bootstrapped and the template is converted into a view." ?

I'm confused by what is meant by bootstrapping in this case ?

Was it helpful?

Solution

There is no main() method in AngularJS. When you create an angular application, you simply declare modules with controllers, directives, etc. When the page loads, angular looks for elements in the DOM with an attribute called 'ng-app', and if found, it boostraps, or starts if you prefer, the application.

See http://docs.angularjs.org/api/ng.directive:ngApp and http://docs.angularjs.org/guide/bootstrap

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top