Retrieving Form Data and Reseting Form | Angular Forms | Angular 13+

Publié le: 06 avril 2022
sur la chaîne: procademy
17,007
150

We are almost done with template driven form in Angular. The only thing which is left to learn is how to retrieve the form data from a template driven form and how to reset a form.

That's what we are going to learn in this lecture. The NgForm object has a value property which contains all the form control as its property and the value entered for those form controls as the value for thos properties.

So, to read the value entered in the form controls of a template driven form, we need to access the value property on NgForm and on that we can access the required property values.

We can also reset the form controls to their initial value and state using reset() method of NgForm. Let's learn these concepts with an example in this lecture.

DOWNLOAD SOURCE CODE FOR THIS SECTION HERE: https://drive.google.com/file/d/1g0FB...


Sur cette page du site, vous pouvez voir la vidéo en ligne Retrieving Form Data and Reseting Form | Angular Forms | Angular 13+ durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur procademy 06 avril 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 17,007 fois et il a aimé 150 téléspectateurs. Bon visionnage!