Reputation: 25
Injected 'ngResouce', Created factory and used $resource in that. Passed factory name to Controller.
Its giving error
"Error: [$injector:unpr] "
Upvotes: 0
Views: 303
Reputation: 286
can you provide more details around your query, i see you have mentioned $resource.
$resource is a factory which creates a resource object that lets you interact with RESTful server-side data sources.
from your question its not clear how you are injecting the resource, if you are defining a module you may try this
angular.module('app', ['ngResource']);
and for creating a factory you may try the below code,
angular.module('app', ['ngResource'])
.factory('myfactory', function($resource){
// your code here
});
Upvotes: 1