"Unknown provider" on a service

2,568 views
Skip to first unread message

"---"

unread,
Aug 8, 2012, 3:08:30 PM8/8/12
to ang...@googlegroups.com
Hello, 

Newbie to angularjs and javascript.

Trying to do several things.

1. To show mouseover text dynamically. Doesn't even work statically.
2. When the service is called, get "Unknown provider". Is there a way to pass parameters to service?
3. How to handle the response?


Thanks for any help.
Iyer.

Renan T. Fernandes

unread,
Aug 8, 2012, 3:31:28 PM8/8/12
to ang...@googlegroups.com
var myApp angular.module('myApp',['myApp.services']);
​should fix.

2012/8/8 "---" <sethu....@gmail.com>

--
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.
 
 



--
Renan Fernandes(aka "ShadowBelmolve")

Pawel Kozlowski

unread,
Aug 8, 2012, 3:38:21 PM8/8/12
to ang...@googlegroups.com
On Wed, Aug 8, 2012 at 9:31 PM, Renan T. Fernandes
<re...@kauamanga.com.br> wrote:
> var myApp = angular.module('myApp',['myApp.services']);
> should fix.

The ngResource file
(http://code.angularjs.org/1.0.1/angular-resource-1.0.1.js) was
missing as well.... Was looking at this jsFiddle but there were so
many things broken...

Cheers,
Pawel

sethu....@gmail.com

unread,
Aug 8, 2012, 3:52:43 PM8/8/12
to ang...@googlegroups.com
Thanks for you response. I have ngResource in my code(locally), but didn't know how to include it in jsfiddle.

Pawel Kozlowski

unread,
Aug 8, 2012, 4:18:04 PM8/8/12
to ang...@googlegroups.com
Hi!

On Wed, Aug 8, 2012 at 9:52 PM, <sethu....@gmail.com> wrote:
> Thanks for you response. I have ngResource in my code(locally), but didn't
> know how to include it in jsfiddle.

For including resources: just have a look at the "Manage Resources"
section (left part of the screen).

Here is a working (I mean: not throwing JS errors and actually
triggering a PUT request) jsFiddle: http://jsfiddle.net/7A73Q/4/
I'm not sure if this is what you are trying to do so don't hesitate to
come back with more questions if you still need help....

Cheers,
Pawel

sethu....@gmail.com

unread,
Aug 8, 2012, 5:06:51 PM8/8/12
to ang...@googlegroups.com
Thanks a lot Pawl, that works nice.
Reply all
Reply to author
Forward
0 new messages