Forms

Typically in Single Page Frameworks (SPA) such as Angular, forms are not used to automatically submit data to the server, because input fields are bound to properties of JavaScript objects that are sent in JSON format to the server through AJAX operations. However, forms still remain useful for the functionalities listed in the following points 1 and 2. Input fields are validated in the context of all other input fields contained in the same form, and further processing of the form data may proceed only if the form is valid, that is, if all input fields contained in the form are valid.

HTML forms have three connected purposes: 

  1. Grouping input fields that contribute to the same update operation.
  2. Providing a context for validation. ...

Get Hands-On TypeScript for C# and .NET Core Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.