feat(core): make new Inject() optional for deps specified as InjectionToken (#14486)

fixes #10625
This commit is contained in:
Victor Berchet
2017-02-20 16:20:45 -08:00
committed by GitHub
parent 5f3c8441e4
commit d6a58f9f70
6 changed files with 41 additions and 29 deletions

View File

@ -137,7 +137,7 @@ export function main() {
provide: Hash,
useFactory: (location: string) => `Hash for: ${location}`,
// use a nested array to define metadata for dependencies.
deps: [[new Optional(), new Inject(Location)]]
deps: [[new Optional(), Location]]
}]);
expect(injector.get(Hash)).toEqual('Hash for: null');