feat(di): expose parent injector

This commit is contained in:
yjbanov
2015-05-08 16:24:17 -07:00
parent c82cc47767
commit 2185e7cee9
2 changed files with 11 additions and 0 deletions

View File

@ -348,6 +348,12 @@ export function main() {
expect(childCar).toBe(parentCar);
});
it("should give access to direct parent", () => {
var parent = Injector.resolveAndCreate([]);
var child = parent.resolveAndCreateChild([]);
expect(child.parent).toBe(parent);
});
});
describe("lazy", function () {