TutorialLesson 18Free preview
AngularJS Forms
This lesson is part of AngularJS · All levels
Summary
HTML forms become interactive in AngularJS through ng-model, ng-submit, and ng-disabled attributes. You can turn off the button when the form is not complete and display messages based on validation status. All statuses are available on form objects such as $valid, $dirty, and $error.
Key points
- Ng-submit handles the form delivery without page reload
- Ng-disabled disable control based on condition
- Status forms are available: $valid, $invalid, $dirty, $pristine
- The $error object contains a list of validation violations per control
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.