I'm working with Angular factory and trying to make a webservice call, but looks like it is not recognizing $resource.
.factory('User', function($resource) {
function login() {
// THIS IS NOT WORKING, how do I make a webservice call from here?
$resource('/api/user.json', {}, {
method: 'POST',
isArray: false
});
return true;
}
function logout() {
return false;
}
return {
login : function() { return login(); },
logout: function() { return logout(); }
};
Thanks,
Tee