Use ng-show to control a pop-up box
Change the value of value in the click event of a button (using jQuery Ajax)
Through the console.log, I can see that the value of value has indeed become true, but when I click the button, the order exception box does not pop up. The second click will pop up
Why is it necessary? Execute twice to pop up?
Put $scope.value = true; outside Ajax to pop up the box at once.
Replacing $scope.valuer with $rootScope won’t work either.
Solution.
jq’s ajax will not trigger ng’s checking mechanism. You need to use $http instead or use $scope.$apply after changing the model
http://stackoverflow.com/ques...