如何解決ie9下 對angularjs scope對象 不支持"$apply
4 回答

蕪湖不蕪
TA貢獻1796條經驗 獲得超7個贊
解決方案:
var el=$(this);
$scope.$apply(function () {
$scope.currentChallenge.comments.push({
"user": $scope.currentUser,
"message": el.val()
});
});

開滿天機
TA貢獻1786條經驗 獲得超13個贊
解決方案: var el=$(this); $scope.$apply(function () { $scope.currentChallenge.comments.push({ "user": $scope.currentUser, "message": el.val() }); });
- 4 回答
- 0 關注
- 1010 瀏覽
添加回答
舉報
0/150
提交
取消