Fix which dependency is injected w/ current elem.
Docs for the "Injecting a directive from the current element" indicate that having a dependency of `dependency: Dependency` should cause the current element's dependency to be injected, but then uses the ID value from the parent element in the example. Closes #1032
This commit is contained in:

committed by
Misko Hevery

parent
f822066e2a
commit
045ce3c77a
@ -139,7 +139,7 @@ import {Injectable} from 'angular2/di';
|
|||||||
* @Decorator({ selector: '[my-directive]' })
|
* @Decorator({ selector: '[my-directive]' })
|
||||||
* class MyDirective {
|
* class MyDirective {
|
||||||
* constructor(dependency: Dependency) {
|
* constructor(dependency: Dependency) {
|
||||||
* expect(dependency.id).toEqual(2);
|
* expect(dependency.id).toEqual(3);
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
|
Reference in New Issue
Block a user