0
我保存了一些数据,我从API中获得了正确的响应。之后,我试图在我的。$ save函数结束后使用这些信息。这里是我的代码:
auxPostulation = new Postulation($scope.postulation);
auxPostulation.$save(null, function(response){
//I get the response and the id value without trouble.
$scope.postulation_id = response.id;
},function(error){
console.log('erro');
});
我想使用的呼叫之外的反应,但我不能达到它。总是得到'$ scope.postulation_id = undefined'。
这个函数的行为如何?
谢谢您的高级。