Samsung Galaxy Fold

What's new in Angular Forms in Angular 8.0?

Angular 8.0



The official release of Angular 8.0 was on 28 May 2019, his new release came with a lot of new features like :

  • Angular 8.0 support TypeScript 3.4
  • The ivy which the next generation of compiler/runtime of Angular
  • Bazel rapport
  • Service Worker
  • Forms,...
In this article, we will talk about made in the Angular Forms 💗




  1. Markallastouched:

      If you are familiar with Angular Forms you probably know that AbstractControl which is the parent class of FormGroup, FormControl, have some methods like markAsDirtymarkAsTouched,...
in this version Angular team added a new methode whitch is markAllAsTouched() that help to mark a controller as touched but also all its descendants.


form.markAllAsTouched() 



  2.FormArray.Clear

The FormArray class now also has a new method the clear method, to remove all the controls it contains. 
// `Array` is initialized with 3 items
const Array = fb.array([item1, item2 , item3]);
Array.clear();
// users is now empty




hope you find it useful 💗✌

Commentaires