Skip to content

Commit 045ce3c

Browse files
mfollettmhevery
authored andcommitted
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 angular#1032
1 parent f822066 commit 045ce3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/angular2/src/core/annotations/annotations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ import {Injectable} from 'angular2/di';
139139
* @Decorator({ selector: '[my-directive]' })
140140
* class MyDirective {
141141
* constructor(dependency: Dependency) {
142-
* expect(dependency.id).toEqual(2);
142+
* expect(dependency.id).toEqual(3);
143143
* }
144144
* }
145145
* ```

0 commit comments

Comments
 (0)