blob: 1772d3489a45d20de3d4b6da18c1588ae556fa83 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 | @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 auto.$provide#methods_provider
$provide.provider} api doc.
 |