I create a factory like this:
angular.module('todoApp', ['ngResource']).factory('taskService', ['constantsService', function($resource, constantsService){
var serverUrl = constantsService.server_url;
return {
add: function(task){ $resource(serverUrl + '/api/task/', {task: task}, {'query': {method:'POST'}});}
}
}]);
When I add ngResource to my module, I get an empty html element instead of my application.
source
share