This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -93,17 +93,17 @@ Here is an example of manually initializing Angular:
93
93
<script src="http://code.angularjs.org/angular.js"></script>
94
94
<script>
95
95
angular.element(document).ready(function() {
96
- angular.bootstrap(document, ['optionalModuleName']);
96
+ angular.module('myApp', []);
97
+ angular.bootstrap(document, ['myApp']);
97
98
});
98
99
</script>
99
100
</body>
100
101
</html>
101
102
</pre>
102
103
103
104
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.
107
107
108
108
This is the sequence that your code should follow:
109
109
You can’t perform that action at this time.
0 commit comments