2015-07-27 22:12:30 -07:00
p.location-badge.
exported from <a href='../di'>angular2/di</a>
2015-08-06 23:25:42 -07:00
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/di/exceptions.ts#L71-L95">angular2/src/di/exceptions.ts (line 71)</a>
2015-07-27 22:12:30 -07:00
:markdown
Thrown when dependencies form a cycle.
## Example:
```javascript
class A {
constructor(b:B) {}
}
class B {
constructor(a:A) {}
}
```
Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(injector: Injector, key: Key)
:markdown