Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 9b2b93d

Browse files
CalvinFernandezpetebacondarwin
authored andcommitted
docs(bootstrap.ngdoc): clarify bootstrap example
Clear up confusion about module declaration when using manual bootstrap.
1 parent d7fb721 commit 9b2b93d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/content/guide/bootstrap.ngdoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,17 @@ Here is an example of manually initializing Angular:
9393
<script src="http://code.angularjs.org/angular.js"></script>
9494
<script>
9595
angular.element(document).ready(function() {
96-
angular.bootstrap(document, ['optionalModuleName']);
96+
angular.module('myApp', []);
97+
angular.bootstrap(document, ['myApp']);
9798
});
9899
</script>
99100
</body>
100101
</html>
101102
</pre>
102103

103104
Note that we have provided the name of our application module to be loaded into the injector as the second
104-
parameter of the {@link api/angular.bootstrap} function. This example is equivalent to using the
105-
{@link api/ng.directive:ngApp ng-app} directive, with `ng-app="optionalModuleName"`, as in the automatic
106-
initialization example above.
105+
parameter of the {@link api/angular.bootstrap} function. Notice that `angular.bootstrap` will not create modules
106+
on the fly. You must create any custom {@link guide/module modules} before you pass them as a parameter.
107107

108108
This is the sequence that your code should follow:
109109

0 commit comments

Comments
 (0)