Skip to content
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

Unknown provider: AnalyticsProviderProvider <- AnalyticsProvider #97

Closed
jrosseel opened this issue Sep 3, 2015 · 2 comments
Closed

Comments

@jrosseel
Copy link

jrosseel commented Sep 3, 2015

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);

@justinsa
Copy link
Collaborator

justinsa commented Sep 3, 2015

You should be calling it Analytics in your run block. Angular then looks for AnalyticsProvider to create the Analytics instance.

@jrosseel
Copy link
Author

jrosseel commented Sep 3, 2015

I see, thx!

@jrosseel jrosseel closed this as completed Sep 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants