diff --git a/docs/content/guide/bootstrap.ngdoc b/docs/content/guide/bootstrap.ngdoc index ae1c7949..aa3535a3 100644 --- a/docs/content/guide/bootstrap.ngdoc +++ b/docs/content/guide/bootstrap.ngdoc @@ -7,6 +7,7 @@ This page explains the Angular initialization process and how you can manually initialize Angular if necessary. + ## Angular ` - - + + + Hello {{'World'}}! + + + + ``` -Note that we have provided the name of our application module to be loaded into the injector as the second +Note that we provided the name of our application module to be loaded into the injector as the second parameter of the {@link angular.bootstrap} function. Notice that `angular.bootstrap` will not create modules on the fly. You must create any custom {@link guide/module modules} before you pass them as a parameter. +You should call `angular.bootstrap()` *after* you've loaded or defined your modules. +You cannot add controllers, services, directives, etc after an application bootstraps. + +
+**Note:** You should not use the ng-app directive when manually bootstrapping your app. +
+ This is the sequence that your code should follow: 1. After the page and all of the code is loaded, find the root element of your AngularJS @@ -114,6 +127,7 @@ This is the sequence that your code should follow: 2. Call {@link angular.bootstrap} to {@link compiler compile} the element into an executable, bi-directionally bound application. + ## Deferred Bootstrap This feature enables tools like Batarang and test runners to