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:
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
103104Note 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
108108This is the sequence that your code should follow:
109109
You can’t perform that action at this time.
0 commit comments