From 045ce3c77aebe872b4a3d746e4a7fb416b3b301e Mon Sep 17 00:00:00 2001 From: Matt Follett Date: Fri, 20 Mar 2015 13:05:18 -0500 Subject: [PATCH] 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 --- modules/angular2/src/core/annotations/annotations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/angular2/src/core/annotations/annotations.js b/modules/angular2/src/core/annotations/annotations.js index ddfd500f53..4ca676388f 100644 --- a/modules/angular2/src/core/annotations/annotations.js +++ b/modules/angular2/src/core/annotations/annotations.js @@ -139,7 +139,7 @@ import {Injectable} from 'angular2/di'; * @Decorator({ selector: '[my-directive]' }) * class MyDirective { * constructor(dependency: Dependency) { - * expect(dependency.id).toEqual(2); + * expect(dependency.id).toEqual(3); * } * } * ```