Answer the question
In order to leave comments, you need to log in
Why doesn't angular show changes until hover over them?
Replaced an interesting feature. If you make changes through setTimout() in the scope: <div ng-show="showMe">Покажи это сообщение</div>
and in the controller:
showMe = true;
setTimout(function(){
showMe = false
}, 0)
Answer the question
In order to leave comments, you need to log in
The problem is that setTimeout calls the function asynchronously, and you need to notify Angular that the data needs to be updated using the $scope.$apply()
.
To avoid this, you can use the service $timeout
(document link) instead of the standard window.setTimeout
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question