You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for this library, it's working great except I have one issue that I just can't figure out. I'm defining a configuration block in a module and need to inject a provider, and I have strictDi enabled:
Obviously I get an error if I try to run this as-is:
Error: [$injector:strictdi] config is not using explicit annotation and cannot be invoked in strict mode
So my question is how can I annotate this function explicitly if I'm using the @NgModule decorator? Also worth mentioning, I am not use any 'ng-annotate' fork since I couldn't get it to work so for now I'm defining $inject to support strictDi for my components, but obviously I can't do the same for the config function. Any ideas?
The text was updated successfully, but these errors were encountered:
You could use inline array annotation. Unfortunately the NgModule is incorrectly typed so typescript will complain. You could make a fork and fix the type or fix it with a ts-ignore (not recommended).
Thank you for this library, it's working great except I have one issue that I just can't figure out. I'm defining a configuration block in a module and need to inject a provider, and I have
strictDi
enabled:Obviously I get an error if I try to run this as-is:
So my question is how can I annotate this function explicitly if I'm using the
@NgModule
decorator? Also worth mentioning, I am not use any 'ng-annotate' fork since I couldn't get it to work so for now I'm defining$inject
to supportstrictDi
for my components, but obviously I can't do the same for the config function. Any ideas?The text was updated successfully, but these errors were encountered: