Livecode: Angular Unidirectional Template-driven Forms with signals

  Рет қаралды 1,433

Simplified Courses

Simplified Courses

Күн бұрын

Пікірлер: 29
@AgustinCampon
@AgustinCampon Жыл бұрын
This is really a very neat approach, leveraging declarative code, looking forward for the course to be completed!
@pick_simplified
@pick_simplified Жыл бұрын
Thanks!!! ❤
@pick_simplified
@pick_simplified 11 ай бұрын
The course is ready 🎉
@noob_dodger
@noob_dodger 10 ай бұрын
wow, great content, thank you!
@pick_simplified
@pick_simplified 10 ай бұрын
Glad you liked it!! Thanks
@0ni0ng0ld-g6i
@0ni0ng0ld-g6i Жыл бұрын
This is awesome, thank you!
@pick_simplified
@pick_simplified Жыл бұрын
Thanks!!
@alexandrumacavei7323
@alexandrumacavei7323 11 ай бұрын
Can't wait to start migrating to these type of forms in our app! Would be nice if you could show an example with dynamic forms that contain arrays of form controls.
@qvisten999
@qvisten999 4 ай бұрын
Great videos. Did you ever create and example with Arrays?
@pick_simplified
@pick_simplified 4 ай бұрын
Yes I did, blog.simplified.courses/template-driven-forms-with-form-arrays/
@tleveque
@tleveque 11 ай бұрын
I see a problem with this approach. If you need to disable an input in the form, it will not be part of the valueChange event. And because you use the set method on your signal, you will loose the value of the "disabled" input.
@pick_simplified
@pick_simplified 11 ай бұрын
Thank you so much for raising this! Indeed, with the update function and destructuring both values the value is kept! I will dig deeper and add this to my course and also my free content! Stay awesome! thx!
@tleveque
@tleveque 11 ай бұрын
@@pick_simplified But you won’t be able to directly use the update function in the form tag. You will have to call a method in your component to do that. Maybe there’s another way….
@pick_simplified
@pick_simplified 11 ай бұрын
@@tleveque You are stealing my sleep! But that's a good thing haha🚀I usually do that in the component because I also want to run shapes for typesafety (still have to create free content for that) but you are right! I'm going to think about it. Thanks for your input
@pick_simplified
@pick_simplified 11 ай бұрын
@@tleveque I fixed it by mapping the valueChanges to the raw value of the form🤩
@tleveque
@tleveque 11 ай бұрын
@@pick_simplified Can you give more details? Do you have an updated Stackblitz?
@anutaNYC
@anutaNYC 9 ай бұрын
Can you do this on reactive forms?
@pick_simplified
@pick_simplified 9 ай бұрын
I don't think it makes sense for reactive forms tbh
@anutaNYC
@anutaNYC 9 ай бұрын
Oh, I got it! I was just looking into signals and feel like using them everywhere
@pick_simplified
@pick_simplified 9 ай бұрын
Haha I can relate to that@@anutaNYC
@esdegan7176
@esdegan7176 Жыл бұрын
L I K E
@pick_simplified
@pick_simplified Жыл бұрын
Thank you!!!
@draylegend
@draylegend Жыл бұрын
I've the following form directive: @Directive({ selector: 'form', standalone: true, exportAs: 'appForm', }) export class FormDirective extends NgForm { #ngForm = inject(NgForm); valueSignal = toSignal(this.#ngForm.valueChanges!); #disabledChanges: Observable = this.#ngForm.statusChanges!.pipe( map(s => s === 'INVALID'), ); disabledSignal = toSignal(this.#disabledChanges); } Usage: How to make valueSignal typesafe?
@pick_simplified
@pick_simplified 11 ай бұрын
You can't if you use ngForm directly. However in my latest form directive there is a formValueChange output, that is typesafe. You can check it here: blog.simplified.courses/i-opensourced-my-angular-template-driven-forms-solution/
#Angular form Validations with Vest
2:12
Simplified Courses
Рет қаралды 539
First look at Signals in Angular
18:43
Decoded Frontend
Рет қаралды 45 М.
SISTER EXPOSED MY MAGIC @Whoispelagheya
00:45
MasomkaMagic
Рет қаралды 13 МЛН
Сюрприз для Златы на день рождения
00:10
Victoria Portfolio
Рет қаралды 2,4 МЛН
Life hack 😂 Watermelon magic box! #shorts by Leisi Crazy
00:17
Leisi Crazy
Рет қаралды 80 МЛН
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 113 МЛН
Livecode: Angular template-driven forms state management with signals
6:30
Simplified Courses
Рет қаралды 1,4 М.
Get extremely productive with Angular forms and model validations!
6:56
Simplified Courses
Рет қаралды 1,6 М.
30 Programming Truths I know at 30 that I Wish I Knew at 20
17:41
Signals Unleashed: The Full Guide
1:39:24
Rainer Hahnekamp
Рет қаралды 26 М.
Prefer Template-Driven Forms | Ward Bell | ng-conf 2021
18:56
Angular change detection explained in 5 minutes
6:06
Simplified Courses
Рет қаралды 14 М.
How to Make Forms in Angular REUSABLE (Advanced, 2023)
21:10
Decoded Frontend
Рет қаралды 68 М.
Manage State with Angular Signals
14:24
Deborah Kurata
Рет қаралды 21 М.
Async Validation with Angular Reactive Forms + Firebase
7:20
SISTER EXPOSED MY MAGIC @Whoispelagheya
00:45
MasomkaMagic
Рет қаралды 13 МЛН