尝试在 DWR 回调中更改“模型”时遇到问题。
function mainCtrl($scope) {
$scope.mymodel = "x"; // this is ok
DWRService.searchForSomething(function(result){
$scope.mymodel = result; // PROBLEM!!! it does not rerender the new value
}
$scope.mymodel = "y"; // this is also ok.
}
有人有什么想法吗?