diff options
| author | Calvin Fernandez | 2013-08-23 18:50:08 -0700 | 
|---|---|---|
| committer | Pete Bacon Darwin | 2013-09-05 10:03:46 +0100 | 
| commit | d72fc304e093165a73a3ae5dd37bc0b289aa1c63 (patch) | |
| tree | ca91b421d87cf87830fcba91fd8efa350644acfd | |
| parent | 21b1d22563d044eb10681d6d0ba180d197e76303 (diff) | |
| download | angular.js-d72fc304e093165a73a3ae5dd37bc0b289aa1c63.tar.bz2 | |
docs(bootstrap.ngdoc): clarify bootstrap example
Clear up confusion about module declaration when using manual bootstrap.
| -rw-r--r-- | docs/content/guide/bootstrap.ngdoc | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/docs/content/guide/bootstrap.ngdoc b/docs/content/guide/bootstrap.ngdoc index ef384168..9fbe97ca 100644 --- a/docs/content/guide/bootstrap.ngdoc +++ b/docs/content/guide/bootstrap.ngdoc @@ -92,7 +92,8 @@ Here is an example of manually initializing Angular:      <script src="http://code.angularjs.org/angular.js"></script>      <script>         angular.element(document).ready(function() { -         angular.bootstrap(document, ['optionalModuleName']); +         angular.module('myApp', []); +         angular.bootstrap(document, ['myApp']);         });      </script>    </body> @@ -100,9 +101,8 @@ Here is an example of manually initializing Angular:  </pre>  Note that we have provided the name of our application module to be loaded into the injector as the second -parameter of the {@link api/angular.bootstrap} function. This example is equivalent to using the -{@link api/ng.directive:ngApp ng-app} directive, with `ng-app="optionalModuleName"`, as in the automatic -initialization example above. +parameter of the {@link api/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.   This is the sequence that your code should follow: | 
