Skip to content

Commit 3c3fd26

Browse files
abyxchristopherthielen
authored andcommitted
fix(ngStrictDi): Detect strictDI violations in resolve
In some scenarios, the `$injector` would be asked to annotate without providing it with the current `strictDi` value, making resolvables not complain about missing annotations.
1 parent 0ac932a commit 3c3fd26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function runBlock($injector: IInjectorService, $q: IQService, $uiRouter: UIRoute
9696
.map(x => x.$$state().resolvables)
9797
.reduce(unnestR, [])
9898
.filter(x => x.deps === "deferred")
99-
.forEach(resolvable => resolvable.deps = $injector.annotate(resolvable.resolveFn));
99+
.forEach(resolvable => resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi));
100100
}
101101

102102
// $urlRouter service and $urlRouterProvider

0 commit comments

Comments
 (0)