Why ngModel's $render is not called when the model changes in AngularJS?
问题 DEMO Why in the following example $render is not called when the button is clicked? <input type="text" ng-model="client.phoneNumber" phone-number> <button ng-click="client.phoneNumber='1111111111'">Change phone number</button> .directive("phoneNumber", function() { return { restrict: 'A', require: 'ngModel', link: function(scope, element, attrs, ngModel) { ngModel.$render = function() { alert('rendering'); // This is not called }; } }; }); 回答1: The input directive is running after your