-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AppInsightsService -> Router]: NullInjectorError: No provider for Router! (Angular 6) #46
Comments
Which version of the library are you using? |
Sorry for it taking a while to reply Mark.. |
Here's my insights.module.ts @NgModule({ HERES MY MAIN.TS `import { enableProdMode } from '@angular/core'; import { InsightsModule } from './app/insight.module'; if (environment.production) { platformBrowserDynamic().bootstrapModule(InsightsModule) |
I am also having the original problem. version:
|
@jondmcelroy i fixed that msg with |
Glad you figured it out! 👍 |
I'm getting a similar issue. I don't think just adding I'm not sure if anyone else has a similar issue but it should just work via your documentation. I'm using...
Could be an issue with how Angular 6 tree shakes services now. I'll do some investigation and report back if I fins anything. |
I needed to implement something really quick for work so I ended up just using the `application insights-js` package and my own implementation.
… On Aug 16, 2018, at 9:45 AM, katyasafford ***@***.***> wrote:
Any update on this? I am having the similar issue after updating to Angular 6
Error: No provider for Router! (AuthService -> Router)
at injectionError (core.js:1781)
at noProviderError (core.js:1811)
at ***@***.***/core/fesm5/core.js.ReflectiveInjector_._throwOrNull (core.js:2558)
at ***@***.***/core/fesm5/core.js.ReflectiveInjector_._getByKeyDefault (core.js:2586)
at ***@***.***/core/fesm5/core.js.ReflectiveInjector_._getByKey (core.js:2538)
at ***@***.***/core/fesm5/core.js.ReflectiveInjector_._getByReflectiveDependency (core.js:2528)
at core.js:2510
at Array.map (<anonymous>)
at ***@***.***/core/fesm5/core.js.ReflectiveInjector_._instantiate (core.js:2510)
at ***@***.***/core/fesm5/core.js.ReflectiveInjector_._instantiateProvider (core.js:2501)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#46 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABmsV1ImaN6RPbU-4O7n2Vx5LoYMrnzlks5uRXd_gaJpZM4USLdG>.
|
What did you need to update in the end? @mikecabana I'll close this one out for now as I think that might of fixed the general issue here! |
Hi, |
I am currently updating my insights service to angular 6 and after the update when i try to run ng serve i get the message
I'm not sure on what to do... everything was working fine with angular 5.2
The text was updated successfully, but these errors were encountered: