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 @@ -92,17 +92,17 @@ Here is an example of manually initializing Angular:
92
92
<script src="http://code.angularjs.org/angular.js"></script>
93
93
<script>
94
94
angular.element(document).ready(function() {
95
- angular.bootstrap(document, ['optionalModuleName']);
95
+ angular.module('myApp', []);
96
+ angular.bootstrap(document, ['myApp']);
96
97
});
97
98
</script>
98
99
</body>
99
100
</html>
100
101
</pre>
101
102
102
103
Note that we have provided the name of our application module to be loaded into the injector as the second
103
- parameter of the {@link api/angular.bootstrap} function. This example is equivalent to using the
104
- {@link api/ng.directive:ngApp ng-app} directive, with `ng-app="optionalModuleName"`, as in the automatic
105
- initialization example above.
104
+ parameter of the {@link api/angular.bootstrap} function. Notice that `angular.bootstrap` will not create modules
105
+ on the fly. You must create any custom {@link guide/module modules} before you pass them as a parameter.
106
106
107
107
This is the sequence that your code should follow:
108
108
You can’t perform that action at this time.
0 commit comments