In AngularJS, how can I guarantee that the code only runs after the user interface change has completely changed in the user interface.
For example, let's say that the visibility of the loading indicator is tied to the value of the property isLoading
on the model. How can I guarantee that the following functions will be executed only after the loading indicator becomes visible?
eg.
my-template.html
<my-loading-indicator ng-show="model.isLoading"></my-loading-indicator>
my-controller.js
MyController.prototype.doSomething = function() {
this.model.isLoading = true;
}
source
share