angular.js/docs/content/error/injector/pget.ngdoc
Vojta Jina 14438058da docs: correct broken links
This also contains some whitespace corrections by my editor.
2013-10-18 15:35:41 -07:00

26 lines
No EOL
630 B
Text

@ngdoc error
@name $injector:pget
@fullName Provider Missing $get
@description
This error occurs when attempting to register a provider that does not have a
`$get` method. For example:
```
function BadProvider() {} // No $get method!
angular.module("myApp", [])
.provider('bad', BadProvider); // this throws the error
```
To fix the error, fill in the `$get` method on the provider like so:
```
function GoodProvider() {
this.$get = angular.noop;
}
angular.module("myApp", [])
.provider('good', GoodProvider);
```
For more information, refer to the {@link api/AUTO.$provide#methods_provider
$provide.provider} api doc.