Tuesday, July 2, 2019

Page 325 of "ASP.NET Core 2 and Angular 5" by Valerio De Sanctis touches on Template-Driven forms in Angular 5.

These are the other way to do the forms that everyone hates in contrast to the Model-Driven (or Reactive) forms. They'll have you punching the wall of your cubical when you work on them. You may put the required keyword at an input tag to make it required and you may check form.invalid off of the form that uses ngForm and it should only be true if a validation is not met. This is like form.dirty right? There is a dirty property on each individual field too. The opposite from dirty is pristine and I was surprised to learn of touched hanging off of each field to measure not if something has changed like dirty but if something was ever visited.

No comments:

Post a Comment