$render();
Called when the view needs to be updated. It is expected that the user of the ng-model directive will implement this method.
The $render() method is invoked in the following situations:
-
$rollbackViewValue()is called. If we are rolling back the view value to the last committed value then$render()is called to update the input control. - The value referenced by
ng-modelis changed programmatically and both the$modelValueand the$viewValueare different from last time.
Since ng-model does not do a deep watch, $render() is only invoked if the values of $modelValue and $viewValue are actually different from their previous values. If $modelValue or $viewValue are objects (rather than a string or number) then $render() will not be invoked if you only change a property on the objects.
Please login to continue.