33@fullName Module Unavailable
44@description
55
6- This error occurs when trying to "re-open" a module that has not yet been defined.
6+ This error occurs when you declare a dependency on a module that isn't defined anywhere or hasn't
7+ been loaded in the current browser context.
8+
9+ When you receive this error, check that the name of the module in question is correct and that the
10+ file in which this module is defined has been loaded (either via `<script>` tag, loader like
11+ require.js, or testing harness like karma).
12+
13+ A less common reason for this error is trying to "re-open" a module that has not yet been defined.
714
815To define a new module, call {@link angular.module angular.module} with a name
916and an array of dependent modules, like so:
1017
11- ```
18+ ```js
1219// When defining a module with no module dependencies,
13- // the requires array should be defined and empty.
20+ // the array of dependencies should be defined and empty.
1421var myApp = angular.module('myApp', []);
1522```
1623
1724To retrieve a reference to the same module for further configuration, call
18- `angular.module` without the `requires` array.
25+ `angular.module` without the array argument .
1926
20- ```
27+ ```js
2128var myApp = angular.module('myApp');
2229```
2330
24- Calling `angular.module` without the `requires` array when the module has not yet
25- been defined causes this error to be thrown. To fix it, define your module with
26- a name and an empty array, as in the first example above.
31+ Calling `angular.module` without the array of dependencies when the module has not yet been defined
32+ causes this error to be thrown. To fix it, define your module with a name and an empty array, as in
33+ the first example above.
0 commit comments