调用$ digest或应用
时发生错误 registerAjax = ->
successRegister = ->
$scope.showRegistrationPanel = false
$scope.showEndRegistrationPanel = true
$scope.$digest()
errorRegister = (response) ->
$scope.textErrorPanelRegistration = response.data.error
$scope.showErrorPanel = true
$scope.$apply()
data =
password: $scope.user.password
firstName: $scope.user.firstName
lastName: $scope.user.lastName
email: $scope.user.email
http.post REGISTER_URL, data
.then successRegister, errorRegister
当调用$ digest或$ apply时,错误起飞但一切正常
Error: [$rootScope:inprog] http://errors.angularjs.org/1.4.7/$rootScope/inprog?p0=%24digest
at Error (native)
at http://localhost:8000/lib/angular/angular.min.js?M420gm3LwzcQLAcaXrk6IQ:6:416
答案 0 :(得分:1)