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

Опубликовано: 06 Апрель 2022
на канале: 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...


На этой странице сайта вы можете посмотреть видео онлайн Retrieving Form Data and Reseting Form | Angular Forms | Angular 13+ длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь procademy 06 Апрель 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 17,007 раз и оно понравилось 150 зрителям. Приятного просмотра!