diff options
| author | Peter Bacon Darwin | 2014-02-16 22:02:31 +0000 |
|---|---|---|
| committer | Peter Bacon Darwin | 2014-02-16 22:02:41 +0000 |
| commit | 33e1bdc543bcb7875dcc004d487333393670ed2d (patch) | |
| tree | 7ff1f564ab486f049b7e9e5ad946a6a88bb651b6 /docs/content/error/$injector/unpr.ngdoc | |
| parent | 49f90e559ed412402ad7444bc2db2bc1c182ddf5 (diff) | |
| download | angular.js-33e1bdc543bcb7875dcc004d487333393670ed2d.tar.bz2 | |
chore(errors): rename folders to match namespaces
Diffstat (limited to 'docs/content/error/$injector/unpr.ngdoc')
| -rw-r--r-- | docs/content/error/$injector/unpr.ngdoc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/content/error/$injector/unpr.ngdoc b/docs/content/error/$injector/unpr.ngdoc new file mode 100644 index 00000000..1b0faa8e --- /dev/null +++ b/docs/content/error/$injector/unpr.ngdoc @@ -0,0 +1,26 @@ +@ngdoc error +@name $injector:unpr +@fullName Unknown Provider +@description + +This error results from the `$injector` being unable to resolve a required +dependency. To fix this, make sure the dependency is defined and spelled +correctly. For example: + +``` +angular.module('myApp', []) + .controller('myCtrl', ['myService', function (myService) { + // Do something with myService + }]); +``` + +This code will fail with `$injector:unpr` if `myService` is not defined. Making +sure each dependency is defined will fix the problem. + +``` +angular.module('myApp', []) + .service('myService', function () { /* ... */ }) + .controller('myCtrl', ['myService', function (myService) { + // Do something with myService + }]); +```
\ No newline at end of file |
