Unknown provider: AnalyticsProviderProvider <- AnalyticsProvider
Closed this issue · 2 comments
I get the error: Unknown provider: AnalyticsProviderProvider <- AnalyticsProvider when just including the script and injecting it into the application.
Everything is fine in app.config, I'm able to configure the service just fine. But when I enter app.run, my application breaks down and gives me this error.
Any ideas on what might cause this?
My config settings:
AnalyticsProvider.setAccount('UA-somecode');
AnalyticsProvider.trackPages(true);
AnalyticsProvider.trackUrlParams(true);
AnalyticsProvider.useDisplayFeatures(true);
AnalyticsProvider.ignoreFirstPageLoad(true);
AnalyticsProvider.useAnalytics(true);
You should be calling it Analytics in your run block. Angular then looks for AnalyticsProvider to create the Analytics instance.
I see, thx!