DEMO
为什么在下面的例子中,点击按钮时不会调用$ render?
<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 }; } }; });