Upgrade to angularjs 1.2.0 rc1
This commit is contained in:
parent
d223dfd662
commit
d6b021bfaf
674 changed files with 79667 additions and 62269 deletions
24
lib/angular/docs/partials/error/$injector:cdep.html
Executable file
24
lib/angular/docs/partials/error/$injector:cdep.html
Executable file
|
@ -0,0 +1,24 @@
|
|||
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/injector/cdep.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Circular Dependency</code>
|
||||
<div><span class="hint">error in component <code ng:non-bindable="">$injector</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><pre class="minerr-errmsg" error-display="Circular dependency found: {0}">Circular dependency found: {0}</pre>
|
||||
<h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="-injector-page -injector-cdep-page"><p>This error occurs when the <a href="api/angular.injector"><code>$injector</code></a> 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.</p>
|
||||
<p>For example:</p>
|
||||
<pre><code>angular.module('myApp', [])
|
||||
.factory('myService', function (myService) {
|
||||
// ...
|
||||
})
|
||||
.controller('MyCtrl', function ($scope, myService) {
|
||||
// ...
|
||||
});</code></pre>
|
||||
<p>When an instance of <code>MyCtrl</code> is created, the service <code>myService</code> will be created
|
||||
by the <code>$injector</code>. <code>myService</code> depends on itself, which causes the <code>$injector</code>
|
||||
to detect a circular dependency and throw the error.</p>
|
||||
<p>For more information, see the <a href="guide/di">Dependency Injection Guide</a>.</p>
|
||||
</div></div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue