Answer the question
In order to leave comments, you need to log in
How to get response from server in angularjs using $resource after saving model ?
todo = new Todo();
todo.text = 'text'
todo.done = false
todo.$save()
Answer the question
In order to leave comments, you need to log in
From documentation.
var User = $resource('/user/:userId', {userId:'@id'});
User.get({userId:123}, function(u, getResponseHeaders){
u.abc = true;
u.$save(function(u, putResponseHeaders) {
//u => saved user object
//putResponseHeaders => $http header getter
});
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question