© Mark Clow 2018
Mark ClowAngular 5 Projectshttps://doi.org/10.1007/978-1-4842-3279-8_19

19. Forms

Mark Clow1 
(1)
Sandy Springs, Georgia, USA
 
You can’t enter data in an application without forms. AngularJS allowed the user to create forms quickly, using the NgModel directive to bind the input element to the data in the $scope. You can also do the same in Angular, but Angular 4 has a new Forms module that makes it easier to do the following:
  • Create forms dynamically

  • Validate input with common validators (required)

  • Validate input with custom validators

  • Test forms

Two Ways of Writing Forms

You can continue writing forms in a similar way to how you used to in AngularJS, but I recommend using the new Forms module because it does more work for you. The Forms ...

Get Angular 5 Projects: Learn to Build Single Page Web Applications Using 70+ Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.