ngModel.NgModelController.$render()

$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-model is changed programmatically and both the $modelValue and the $viewValue are different from last time. Since ng-mode

ngModel.NgModelController.$pristine

$pristine boolean True if user has not interacted with the control yet.

ngModel.NgModelController.$pending

$pending Object An object hash with all pending validator ids as keys.

ngModel.NgModelController.$parsers

$parsers Array.<Function> Array of functions to execute, as a pipeline, whenever the control reads value from the DOM. The functions are called in array order, each passing its return value through to the next. The last return value is forwarded to the $validators collection. Parsers are used to sanitize / convert the $viewValue. Returning undefined from a parser means a parse error occurred. In that case, no $validators will run and the ngModel will be set to undefined unless ngModelOpt

ngModel.NgModelController.$name

$name string The name attribute of the control.

ngModel.NgModelController.$modelValue

$modelValue * The value in the model that the control is bound to.

ngModel.NgModelController.$isEmpty()

$isEmpty(value); This is called when we need to determine if the value of an input is empty. For instance, the required directive does this to work out if the input has data or not. The default $isEmpty function checks whether the value is undefined, '', null or NaN. You can override this for input directives whose concept of being empty is different from the default. The checkboxInputType directive does this because in its case a value of false implies empty. Parameters Param Type Details v

ngModel.NgModelController.$invalid

$invalid boolean True if at least one error on the control.

ngModel.NgModelController.$formatters

$formatters Array.<Function> Array of functions to execute, as a pipeline, whenever the model value changes. The functions are called in reverse array order, each passing the value through to the next. The last return value is used as the actual DOM value. Used to format / convert values for display in the control. function formatter(value) { if (value) { return value.toUpperCase(); } } ngModel.$formatters.push(formatter);

ngModel.NgModelController.$error

$error Object An object hash with all failing validator ids as keys.