aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/error/$injector/pget.ngdoc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/error/$injector/pget.ngdoc')
-rw-r--r--docs/content/error/$injector/pget.ngdoc26
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/content/error/$injector/pget.ngdoc b/docs/content/error/$injector/pget.ngdoc
new file mode 100644
index 00000000..1772d348
--- /dev/null
+++ b/docs/content/error/$injector/pget.ngdoc
@@ -0,0 +1,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. \ No newline at end of file