Custom form controls in Angular | Angular Video Series Part 29

preview_player
Показать описание
Custom form controls in Angular

Handling and controlling form elements in Angular is one of the most powerful features of this framework. You can choose between template-driven or reactive forms and easily validate and save your inputs.

But what if you have a custom element like a star rating component or a knob? Controlling these kinds of custom elements are not being handled out of the box, and usually, developers come up with a hacky way to implement the logic around them.

Also what if you want to break your complex form into more child components? Now your form elements are custom components as well, and you can’t just add formControlName to them and expect it to work.

That’s why we have a ControlValueAccessor.

0:00 Intro
1:30 Creating new component
3:40 Implementing ControlValueAccessor
5:10 Setting up component provider

🧿 I discussed:

✔️ Why do we need custom form controls?
✔️ How to create custom form control?

************************************************************
Next video:
************************************************************

👉 Linkedin:

👉 Instagram:

👉 Discord:

👉 Portfolio:
Рекомендации по теме
Комментарии
Автор

Hi from Spain. I have seen 4 videos of this topic. I couldn't understand. With yours all clear.

tutorialespedronieto