Error: Unknown provider: userProvider <- user????

468 views
Skip to first unread message

alx....@gmail.com

unread,
Jan 14, 2013, 3:18:10 AM1/14/13
to ang...@googlegroups.com
I lost 4 hours solving this error without any success. I dont know whats wrong? any ideas? 

View the error in google chromes console.

Joshua Miller

unread,
Jan 14, 2013, 3:20:33 AM1/14/13
to angular
Hello!

Unfortunately, I get `403 Forbidden` when trying to load that URL. But the error means that Angular is unable to load the "user" service you are requesting. Are you sure it's been loaded and that it's in the same or in a required module?

Post a Plunker of jsFiddle if you can.

Josh


--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en-US.
 
 

Alex

unread,
Jan 14, 2013, 3:22:50 AM1/14/13
to ang...@googlegroups.com
Sorry for the access error. I fixed it now. Could you go to the url again?

Alex

unread,
Jan 14, 2013, 3:24:48 AM1/14/13
to ang...@googlegroups.com
Oh gosh thank you! I had miss spelles the users service :( 

Problem solved mate :)

Rafael Nami

unread,
Jan 14, 2013, 5:45:26 AM1/14/13
to ang...@googlegroups.com
I had a similar problem yesterday.
Solved it going step by step from 1 file/module to separated file modules...
Even having the same naming convention in services module (topServices), and injecting it throught the main module, it was having this same error...
That's when a question comes to my mind - does the module loading matters? Because I've fixed it putting the app.js loading after services.js...
It was at first:

<script type='text/javascript' src='myApp.js' />
<script type='text/javascript' src='myServices.js' />
<script type='text/javascript' src='myFilters.js' />
<script type='text/javascript' src='myControllers.js' />

Then I've switched to 
<script type='text/javascript' src='myFilters.js' />
<script type='text/javascript' src='myServices.js' />
<script type='text/javascript' src='myControllers.js' />
<script type='text/javascript' src='myApp.js' />

And everything worked like a charm. Is it related to the problem?

Thanks in advance and Kind Regards



2013/1/14 Alex <alex....@gmail.com>
Reply all
Reply to author
Forward
0 new messages