<h1><code ng:non-bindable="">NgModelController</code>
<span class="hint">(type in module <code ng:non-bindable="">ng</code>
)</span>
</h1>
<div><h2 id="Description">Description</h2>
<div class="description"></div>
<div class="member method"><h2 id="Methods">Methods</h2>
<ul class="methods"><li><h3 id="$setValidity">$setValidity(validationErrorKey, isValid)</h3>
<div class="$setvalidity"><p>Change the validity state, and notifies the form when the control changes validity. (i.e. it
does not notify form if given validator is already marked as invalid).</p>

<p>This method should be called by validators - i.e. the parser or formatter functions.</p><h4 id="Parameters">Parameters</h4>
<ul class="parameters"><li><code ng:non-bindable="">validationErrorKey – {string} – </code>
<p>Name of the validator. the <code>validationErrorKey</code> will assign
to <code>$error[validationErrorKey]=isValid</code> so that it is available for data-binding.
The <code>validationErrorKey</code> should be in camelCase and will get converted into dash-case
for class name. Example: <code>myError</code> will result in <code>ng-valid-my-error</code> and <code>ng-invalid-my-error</code>
class and can be bound to as  <code>{{someForm.someControl.$error.myError}}</code> .</p></li>
<li><code ng:non-bindable="">isValid – {boolean} – </code>
<p>Whether the current state is valid (true) or invalid (false).</p></li>
</ul>
</div>
</li>
<li><h3 id="$setViewValue">$setViewValue(value)</h3>
<div class="$setviewvalue"><p>Read a value from view.</p>

<p>This method should be called from within a DOM event handler.
For example <a href="api/angular.module.ng.$compileProvider.directive.input"><code>input</code></a> or
<a href="api/angular.module.ng.$compileProvider.directive.select"><code>select</code></a> directives call it.</p>

<p>It internally calls all <code>formatters</code> and if resulted value is valid, updates the model and
calls all registered change listeners.</p><h4 id="Parameters">Parameters</h4>
<ul class="parameters"><li><code ng:non-bindable="">value – {string} – </code>
<p>Value from the view.</p></li>
</ul>
</div>
</li>
</ul>
</div>
<div class="member property"><h2 id="Properties">Properties</h2>
<ul class="properties"><li><h3 id="$viewValue">$viewValue</h3>
<div class="$viewvalue"><p>Actual string value in the view.</p></div>
</li>
<li><h3 id="$modelValue">$modelValue</h3>
<div class="$modelvalue"><p>The value in the model, that the control is bound to.</p></div>
</li>
<li><h3 id="$parsers">$parsers</h3>
<div class="$parsers"><p>Whenever the control reads value from the DOM, it executes
all of these functions to sanitize / convert the value as well as validate.</p></div>
</li>
<li><h3 id="$formatters">$formatters</h3>
<div class="$formatters"><p>Whenever the model value changes, it executes all of
these functions to convert the value as well as validate.</p></div>
</li>
<li><h3 id="$error">$error</h3>
<div class="$error"><p>An bject hash with all errors as keys.</p></div>
</li>
<li><h3 id="$pristine">$pristine</h3>
<div class="$pristine"><p>True if user has not interacted with the control yet.</p></div>
</li>
<li><h3 id="$dirty">$dirty</h3>
<div class="$dirty"><p>True if user has already interacted with the control.</p></div>
</li>
<li><h3 id="$valid">$valid</h3>
<div class="$valid"><p>True if there is no error.</p></div>
</li>
<li><h3 id="$invalid">$invalid</h3>
<div class="$invalid"><p>True if at least one error on the control.</p></div>
</li>
</ul>
</div>
</div>
