Angularjs Examples

AJS Examples


AngularJS Form Directive

The AngularJS ng-form directive is used to keep nested form while browser do not allow nesting of

elements.

Syntax

AngulaJS ng-form Properties

PropertyDescription
$validIt is used to check inputs are valid or not.
$invalidIt is used to check inputs are invalid or not.
$pristineIt is used to check inputs are unmodified by the user or not.
$dirtyIt is used to check inputs are modified by the user or not. Its just revers of pristine.
$errorThis contains collection of invalid control's input, if a validation fail it return true, otherwise false.

AngularJS Form Directive Example