Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Provide context for "unknown provider" errors. #8135

Closed
nhooey opened this issue Jul 10, 2014 · 3 comments
Closed

Provide context for "unknown provider" errors. #8135

nhooey opened this issue Jul 10, 2014 · 3 comments

Comments

@nhooey
Copy link

nhooey commented Jul 10, 2014

When you get an error like this:

Error: Unknown provider: userProfileProvider <- userProfile

The stack trace is exclusively inside of Angular code, and there is nothing in the error that says which controller's instantiation, or any other object's instantiation, the error is coming from.

There should be enough context to detect where the issue is happening. This is currently very hard to debug.

@rodyhaddad
Copy link
Contributor

The issue is that $injector.invoke needs to know about the name of the thing it's instantiating.

It's definitely doable, but would require a bit of refactoring across the codebase

Would you like to tackle it and send a PR?

@nhooey
Copy link
Author

nhooey commented Jul 14, 2014

I've never worked on the Anuglar.js codebase. I was hoping you guys could take care of it.

@Narretz Narretz added this to the Backlog milestone Jul 14, 2014
@btford btford removed the gh: issue label Aug 20, 2014
ocombe added a commit to ocombe/angular.js that referenced this issue Oct 21, 2014
ocombe added a commit to ocombe/angular.js that referenced this issue Oct 21, 2014
ocombe added a commit to ocombe/angular.js that referenced this issue Oct 21, 2014
ocombe added a commit to ocombe/angular.js that referenced this issue Oct 21, 2014
ocombe added a commit to ocombe/angular.js that referenced this issue Oct 21, 2014
ocombe added a commit to ocombe/angular.js that referenced this issue Oct 21, 2014
@caitp caitp closed this as completed in 013b522 Dec 2, 2014
@pkozlowski-opensource
Copy link
Member

Yay!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants