Open rubenCodeforges opened 6 years ago
even more , if i try to inject via class propperty :
@Inject(AuthService) getAuth: AuthService;
i will get an error
VM88192:64 Uncaught TypeError: Cannot read property '$inject' of undefined
at InjectMetadata.paramDecoratorForNonConstructor
If I remember correctly, you'd want to do something like $inject = [getInjectableName(AuthService)]
.
@aciccarello Yep that works , thanks. That should be somewhere in the docs , because sometimes you cant take a huge app and just rewrite it all , in terms of backwards compatibility you are forced to do it in progression.
First for all thanks for the hard work , unfortunate i didnt found any mentions in the docs or closed issues.
So the question is very simple:
the question is ,d how do i provide the ngMetadata created service in
$inject
? Ive tried with string'UserServiceCreatedWithNgMetadata'
not found , ive tried withUserServiceCreatedWithNgMetadata
not found , ive tried withUserServiceCreatedWithNgMetadata.name
same story.another example is httpInterceptor
In the interceptor example i will get a strictDi error aswell