Angular Forms: Build Dynamic Complex Forms Easily

  Рет қаралды 5,043

Monsterlessons Academy

Monsterlessons Academy

Күн бұрын

Пікірлер: 49
@burningtree878
@burningtree878 4 ай бұрын
Nicely done, thank you for sharing. It might be a lot to ask but it would be very interesting to see the template drive equivalent approach.
@MonsterlessonsAcademy
@MonsterlessonsAcademy 4 ай бұрын
Won't happen. Template driven forms are not flexible and I don't recommend to use them at all.
@deveduoliveira
@deveduoliveira 3 ай бұрын
Very good video. Excellent explication. Im from Brazil. This help a lot in my work. Actually working in exactly this scenario. Im share with my work colleagues. Thanks!!
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 ай бұрын
Glad it was helpful!
@yaibanoutsukushii
@yaibanoutsukushii 4 ай бұрын
great introduction! reactive forms are very useful but also very diffcult to learn, thanks for teaching me something new!
@MonsterlessonsAcademy
@MonsterlessonsAcademy 4 ай бұрын
Glad it was helpful!
@FRITS-Kh
@FRITS-Kh 3 ай бұрын
Thanks for the video! A tip: the remove buttons should also be button tags instead of spans because the keyboard can't select a span, which is not semantic.
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 ай бұрын
Sure, but not each project needs accessibility
@FRITS-Kh
@FRITS-Kh 3 ай бұрын
I haven't faced such projects in my 14-year career. While there were instances where accessibility was not prioritized, but it was maintained at a basic semantic level because implementing accessibility features costs little but provides significant convenience for users.
@JoseLeMalin
@JoseLeMalin 3 ай бұрын
Thank you for your work and sharing your knowledge !
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 ай бұрын
My pleasure!
@jurybalikov7063
@jurybalikov7063 4 ай бұрын
Many thanks, forms are still a thing Im sure I could be handling more effectively.
@MonsterlessonsAcademy
@MonsterlessonsAcademy 4 ай бұрын
Good to hear!
@Khai.it98
@Khai.it98 Ай бұрын
How to insert new form at index?
@jln06140
@jln06140 4 ай бұрын
always the best angular instructor on youtube !!! thank you very much ( I'm french dev, sorry for my english)
@MonsterlessonsAcademy
@MonsterlessonsAcademy 4 ай бұрын
Wow, thanks!
@andrejkling3886
@andrejkling3886 4 ай бұрын
Thank you 💯🔥
@MonsterlessonsAcademy
@MonsterlessonsAcademy 4 ай бұрын
Any time!
@nickolaizein7465
@nickolaizein7465 4 ай бұрын
NonNullableFormBuilder - thank you :)
@MonsterlessonsAcademy
@MonsterlessonsAcademy 4 ай бұрын
My pleasure!
@user-ep2vn2wb5m
@user-ep2vn2wb5m 4 ай бұрын
Thanks, It would be really useful to have a form builder that automatically types the form according to its initialization
@MonsterlessonsAcademy
@MonsterlessonsAcademy 4 ай бұрын
I agree
@pramudisrimali1705
@pramudisrimali1705 2 ай бұрын
excellent... thanks a lot
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 ай бұрын
Most welcome!
@aliali-pn1cb
@aliali-pn1cb 4 ай бұрын
Good
@MonsterlessonsAcademy
@MonsterlessonsAcademy 4 ай бұрын
Thanks
@csayantan
@csayantan 3 ай бұрын
i really wonder if we can add an API based validation in a dynamic form in angular 17 /18 such as captcha validation or populate cities from multiple countries in a auto complete field in nonnullable forms etc.
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 ай бұрын
You can simply use formData.setErrors({errorMessage:item.errorMessage}) after you make your API call.
@joao_penas
@joao_penas 4 ай бұрын
Nice example 👌 Just curiosity, why use FormBuilder, and not FormGroup and FormControl for build the form 😊? By the way, one good point to improve would be add an id to identify the question, because if lately would like apply some filter, the removed question with index could be different and remove unwanted question. Continue the good work 😊
@MonsterlessonsAcademy
@MonsterlessonsAcademy 4 ай бұрын
There are different ways. Use what is comfortable for you. Sure you can also use IDs
@front-flow
@front-flow 4 ай бұрын
Problem. We get a bug if: 1) Create a second input 2) Set it to some value 3) Delete the first input
@front-flow
@front-flow 4 ай бұрын
P.S. the problem with the index
@MonsterlessonsAcademy
@MonsterlessonsAcademy 4 ай бұрын
If it's an index problem it makes sense to work with elements by ID then
@front-flow
@front-flow 4 ай бұрын
@@MonsterlessonsAcademy But you can only delete by index)
@user-bv5qg4nf4t
@user-bv5qg4nf4t 3 ай бұрын
You are correct , change @for with *ngfor and typescript side use new formcontrolName()
@andresmauriciofajardoolaya2721
@andresmauriciofajardoolaya2721 4 ай бұрын
Great video
@MonsterlessonsAcademy
@MonsterlessonsAcademy 4 ай бұрын
Thanks!
@leiayuri
@leiayuri 3 ай бұрын
Hi, would you know if I have a component A which extends a directive B. And in comp. a I am in injecting a service A with inject and inside of the constructor I am also calling super and injecting the service A. The question is, am I creating 2 instances os service A? Thanks in advance.
@user-glory-of-ukraine
@user-glory-of-ukraine 2 ай бұрын
I think it depends from few things like: if you providedin :root service A you have 1 instance of components( like singleton). But if you use providers:[ServiceA] in extendable component it will be different instances.
@leiayuri
@leiayuri 2 ай бұрын
@@user-glory-of-ukraine yeah that’s correct. However my question was more related to the new inject where you do thing like serviceA = inject(ServiceA) In that case if we do that more than once in the same component it would create only one instance no matter how many injections you use in the component. That conclusion was based on others dev KZfaq channels. Let me know if you have any points where makes that wrongly or partially correct. Thanks man
@hamza201183
@hamza201183 4 ай бұрын
Many thanks :)
@MonsterlessonsAcademy
@MonsterlessonsAcademy 4 ай бұрын
You're welcome!
@devcognicion
@devcognicion 4 ай бұрын
I'm that 20%, love you since I found you haha :P
@MonsterlessonsAcademy
@MonsterlessonsAcademy 4 ай бұрын
That's awesome!
@andrewl7009
@andrewl7009 4 ай бұрын
Final result has empty string at first answer, probably solution has mistake somewhere
@user-bv5qg4nf4t
@user-bv5qg4nf4t 3 ай бұрын
I written your example in my side and it dos not works well, for example if you add 2 question and fill those fields and then remove first question in UI side remove seconds and typescript side remove first, then i refactored code, instead of @for i used *ngFor and typescript side form control value instead of empty string i written new formControl() after that it works well; please chek your example one more time and see yourself what is going on. thanks
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 ай бұрын
Thank you for letting me know
@daveokey3966
@daveokey3966 4 ай бұрын
Very nice way to strongly type, typed forms! 🦾
@MonsterlessonsAcademy
@MonsterlessonsAcademy 4 ай бұрын
Glad you like it!
NgRx Signal Store - Is It a NgRx Replacement?
20:17
Monsterlessons Academy
Рет қаралды 10 М.
How to Make Forms in Angular REUSABLE (Advanced, 2023)
21:10
Decoded Frontend
Рет қаралды 63 М.
Prank vs Prank #shorts
00:28
Mr DegrEE
Рет қаралды 9 МЛН
Kind Waiter's Gesture to Homeless Boy #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 14 МЛН
managed to catch #tiktok
00:16
Анастасия Тарасова
Рет қаралды 44 МЛН
123 GO! Houseによる偽の舌ドッキリ 😂👅
00:20
123 GO! HOUSE Japanese
Рет қаралды 6 МЛН
Reactive Form Validation in Angular: Mastering Best Practices
13:08
Monsterlessons Academy
Рет қаралды 4,7 М.
Angular 17 Features With Examples - You Must Know That
14:44
Monsterlessons Academy
Рет қаралды 38 М.
Senior Angular Developer Interview (theory)
41:57
WeCoded
Рет қаралды 17 М.
Nesting Reactive Forms in Angular tutorial
24:40
TheRyanSmee
Рет қаралды 15 М.
Angular 17 Defer - Improve Performance in Your Application
11:27
Monsterlessons Academy
Рет қаралды 8 М.
Every React Concept Explained in 12 Minutes
11:53
Code Bootcamp
Рет қаралды 575 М.
Angular Signal Input: Ultimate Guide for Developers
6:52
Monsterlessons Academy
Рет қаралды 4,4 М.
Svelte 5's Secret Weapon: Classes + Context
18:14
Huntabyte
Рет қаралды 17 М.
5 Design Patterns That Are ACTUALLY Used By Developers
9:27
Alex Hyett
Рет қаралды 252 М.
Prank vs Prank #shorts
00:28
Mr DegrEE
Рет қаралды 9 МЛН