Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

angularjs Both ng-model and ng-change on input alter the $scope state - which one takes priority

... ng-change:
if (smth.paused) {
    try {
      throw new Error('ERROR');
    } catch (error) {
      $timeout(() => { // Can not and should not be done immediately
          smth.paused = false;
      })
    }
}
 
PREVIOUS NEXT
Tagged: #angularjs #Both #input #alter #state #takes #priority
ADD COMMENT
Topic
Name
7+9 =