Anglar6 tutorial
A tutorial for Angular6. Please have a look to the Github repository NGNews6.
A tutorial for Angular6. Please have a look to the Github repository NGNews6.
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
é<br />
Angular<br />
© Gérald Abbadie 2018<br />
Traitement des validations côté composant<br />
Les contrôles s'ajoutent en arument dans le contrôle du FormBuilder :<br />
id: fb.control('', [Validators.required, Validators.minLength(3)]),<br />
On retrouve aussi bien entendu :<br />
»»<br />
Validators.minLength(n)<br />
»»<br />
Validators.maxLength(n)<br />
»»<br />
Validators.email()<br />
»»<br />
Validators.pattern(p)<br />
Traitement des erreurs côté composant<br />
Les erreurs peuvent être surveillées grâce à la méthode get()<br />
Un identifiant est requis<br />
Relativement simple.<br />
POUR ALLER PLUS LOIN, NOUS CONSEILLONS CE TUTORIEL<br />
56