これに関するドキュメントには何も見つかりませんでしたが、リクエストは$apply()
呼び出し内にある必要があるようです-(この$apply()
呼び出しがアクションからのものであるか、手動で呼び出されたかに関係なく)。
この奇妙な動作を他の方法で説明することはできません。
// inside a controller
$scope.resources = Resource.query();
// a request gets sent
問題なく動作しますが、
// somewhere else - in a callback for auto-complete
// just to show that this is outside $scope.$apply() - not realy setTimeout
setTimeout(function(){
$scope.resources = Resource.query();
},100);
// no request gets sent;
});