Typed Forms in Angular

preview_player
Показать описание
Hi friends 👋!

Welcome to another new video all where we're talking about Typed Forms in Angular. Our very own Dylan Hunn shares the details! Are you already using Typed Forms in your applications? Let us know in the comments down below.

Typed Forms Guide

Join the conversation online:
Рекомендации по теме
Комментарии
Автор

I didn't expect it but I got more and more excited towards the end. Dang, this is a great improvement! Bravo~

xucongzhan
Автор

Nice typing improvements. Great type checker and more robust models in future. Nice work guys. I'm excited to see some dynamic, union types examples. Thank you again.

apprun
Автор

this is amazing, it might be slightly annoying to go back and modify the old code but the benefits are huge and good thing we can do it on our own pace without braking old code

aj__
Автор

Angular Forms are just awesome, even the old way. We are a very heavy user of forms in the frontend, be is template driven, reactive, and dynamically. On average our 100+ apps feature roughly 120 form fields.

ProBloggerWorld
Автор

FINALLY MAN was waiting for this like 2 years
Wasn't this always the intuitive way it should work

jeffnikelson
Автор

Typescript and RxJs are the ways to move forward. Typed Forms is totally based on Typescript! I would like to see the same approach with RxJs being more used in Angular!

hansschenker
Автор

Niceeee thank you again Angular teams 💯🔥

MrArdo-branch-main
Автор

TNice tutorials is absolutly the best video of the world you expaining skills are good and it was a honor to see tNice tutorials vid well done

abdulsalaamkhan
Автор

I see no downside to this other than having to go back and update old code ofc lol. Good job!

Double_T_G
Автор

I was excited at first when typed forms were released. But then I opted back to untyped forms I hope for a real reactive forms makeover that will make them more declarative.

aram
Автор

I liked a lot the idea, but I didn't like the implementation. It's too painful the idea to repeat myself to use strong type forms: the interface I'm using to send the request to the API, and exactly the same interface but using the form classes.

My opinion is this should work with the interface model: FormGroup<Person>; public interface Person { name: string; age: number }. And that's it.

For those struggling with it, this code could help some times (I'm not the one who wrote it, and I don't remember who did it, I'm sorry):

export type TypedForm<T extends Record<any, any>> = {
[K in keyof T]-?: T[K] extends Array<infer R>
? FormArray<R extends Record<any, any> ? FormGroup<TypedForm<R>> : FormControl<R>>
: T[K] extends Record<any, any>
? FormGroup<TypedForm<T[K]>>
: FormControl<T[K]>;
}

CarlosHerasme
Автор

Great. But how to focus form-control via code?

muhammadtariq
Автор

style I downloaded the demo to soft soft yesterday, and I'm going to learn from you to make my own stuff, and I wanted to leave tNice tutorials

michelangelol.kapunan
Автор

I am such a nerd because I got impressed by this haha

rajastylez
Автор

tNice tutorials actually was, and I'm just starting myself, I have no idea what I'm doing but I have a ton of ideas in my head. Ti to figure tNice tutorials out

Rahul-rkpn
Автор

You still have much to do in Angular/forms module. It’s so painful to build a form based on a typed model… why not implement a scaffolding function ?

theobellash
Автор

and it softs like a normal honest opinion. I get that so of you are joking, but could you please let it be. I

moviesthataint
Автор

I accidentally deleted the channel rack. I’m lost

prashantbaisoya
Автор

Angular is still way too mambo jambo for very basic functionality. 14 versions and forms still suck. Just switch to svelte with typescript..or vue. This shouldn't be this complex...yuck. Binding forms to variables should be 5 seconds, not this. Angular reminds me of old java...alot of code to get a simple api up and running, yuck...

nsubugakasozi
Автор

FormGroup.control.name ?? I Always thought it was deprecated and use formGroup.get('name')... Great feature anyway :)

Fyasco_AlanChoufa