What is meant by Bootstrapping in angular JS?

sabari picture sabari · Jan 11, 2014 · Viewed 59.4k times · Source

I am a beginner in Angular JS. I was going through the below link. http://docs.angularjs.org/tutorial/step_00

What are the bootstrap files? Where are they located?

What is automatic booting and manual initialization of bootstrapping? I read the disadvantage of manual initialization as below.. from the link http://docs.angularjs.org/guide/bootstrap

Can anyone explain exactly what is the disadvantage here?

Answer

knrz picture knrz · Jan 11, 2014

Bootstrapping is the equivalent of initializing, or starting, your Angular app. There are 2 main ways to do so.

The first is automatically bootstrapping by adding ng-app to the an element in your HTML, like so:

<html ng-app="myApp">
...
</html>

The second would be to bootstrap from the JavaScript, like so, after having creating your app through angular.module("myApp", []);

angular.bootstrap(document, ['myApp']);