aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalvin Fernandez2013-08-23 18:50:08 -0700
committerPete Bacon Darwin2013-09-05 10:24:22 +0100
commit9b2b93d9bd4a9da19d76c4d83bf91e7c7775dacd (patch)
tree29a78ee2785651034ed97a1c471d4ecf0aa2c26a
parentd7fb721b4d9606aadb48683728ea963bbb1b5caf (diff)
downloadangular.js-9b2b93d9bd4a9da19d76c4d83bf91e7c7775dacd.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.ngdoc8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/content/guide/bootstrap.ngdoc b/docs/content/guide/bootstrap.ngdoc
index e73873e4..ce44b9cb 100644
--- a/docs/content/guide/bootstrap.ngdoc
+++ b/docs/content/guide/bootstrap.ngdoc
@@ -93,7 +93,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>
@@ -101,9 +102,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: