/angular-lesson6-forms

Learning project for handling template driven and reactive forms

Primary LanguageTypeScript

Angular Pills 6

This project was developed as a part of a series of projects for practicing angular.

Forms: Template driven forms and Reactive forms

In this project the goal is practice Angular forms within both approaches. The topics covered are:

  • Creating the form and registering the controls
  • Submiting and using the form
  • Understanding of form states (touched, valid, etc.)
  • Accesing the form with ViewChild (Template Driven)
  • Built in validators
  • Outputing validation messages
  • Default values with ngModel property binding (Template Driven)
  • Grouping form controls
  • Handling radio buttons
  • Setting and patching form values
  • Reseting forms
  • Array of form controls (Reactive)
  • Custom validators and custom async validators (Reactive)

Install and run

NodeJs and AngularCLI are required.

Perform a git clone to a local directory, and then:

npm install

After install the dependencies:

ng serve

Built With

Authors

  • Iván Taghavi