From 33e1bdc543bcb7875dcc004d487333393670ed2d Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Sun, 16 Feb 2014 22:02:31 +0000 Subject: chore(errors): rename folders to match namespaces --- docs/content/error/$injector/cdep.ngdoc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 docs/content/error/$injector/cdep.ngdoc (limited to 'docs/content/error/$injector/cdep.ngdoc') diff --git a/docs/content/error/$injector/cdep.ngdoc b/docs/content/error/$injector/cdep.ngdoc new file mode 100644 index 00000000..0e6526b8 --- /dev/null +++ b/docs/content/error/$injector/cdep.ngdoc @@ -0,0 +1,26 @@ +@ngdoc error +@name $injector:cdep +@fullName Circular Dependency +@description + +This error occurs when the {@link angular.injector $injector} tries to get +a service that depends on itself, either directly or indirectly. To fix this, +construct your dependency chain such that there are no circular dependencies. + +For example: + +``` +angular.module('myApp', []) + .factory('myService', function (myService) { + // ... + }) + .controller('MyCtrl', function ($scope, myService) { + // ... + }); +``` + +When an instance of `MyCtrl` is created, the service `myService` will be created +by the `$injector`. `myService` depends on itself, which causes the `$injector` +to detect a circular dependency and throw the error. + +For more information, see the {@link guide/di Dependency Injection Guide}. \ No newline at end of file -- cgit v1.2.3