Description:
In Angular Signal Forms, undefined doesn’t mean “empty”, it means gone.
Optional properties can disappear from the FieldTree.
This video covers:
???? Why optional properties don't work with Signal Forms
???? Why undefined values are missing from the FieldTree
???? How to check whether a field is in the FieldTree
???? And patterns for handling optional properties with Signal Forms
*Links*
Code: https://github.com/DeborahK/angular-signal-forms/tree/main/swVehicles-optional-properties
YouTube video: "Why Null Values Break Angular Signal Forms (And What to Do Instead)": https://youtu.be/h5-R27biCso
YouTube video: "Angular Signal Forms: A First Look at the New Forms API": https://youtu.be/J0pVA4lJMso
NEW Pluralsight course: "Angular: Signals": https://www.pluralsight.com/courses/angular-signals
*Content*
00:00 In this video
00:34 Optional Properties Don't Work!
02:09 Checking if a field is in the FieldTree
03:43 Why optional properties disappear!
04:56 How optional fields break Signal Forms
05:27 Try 1: Define optional with a type OR undefined
06:14 Try 2: Define optional with a type OR null
06:35 Handling Optional Properties: The Right Way
07:36 Angular Signal Forms
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
????About Me
Hey! I'm Deborah Kurata
I'm a software developer and YouTube content creator. I speak at conferences such as VSLive and ng-conf. I write articles for freeCodeCamp. And I'm a Pluralsight author. For my work in support of software developers, I've been recognized with the Microsoft Most Valuable Professional (MVP) award, and I'm a Google Developer Expert (GDE).
View my YouTube content: https://www.youtube.com/@deborah_kurata
Contact me on Twitter: @DeborahKurata
Or on Bluesky: @deborahkurata.bsky.social
Find my Pluralsight courses: https://www.pluralsight.com/profile/author/deborah-kurata
Access my freeCodeCamp articles:
site: freecodecamp.org/news "Deborah Kurata"
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
#Angular
#angularTutorials
#angularforbeginners
#angularbestpractices
#modernAngular
#angularsignalforms
#AngularForms
#signalforms
#signalbasedforms
#formswithsignals
#AngularValidation
#validation
#signalformsvalidation
#validationwithsignalforms
#optionalpropertiesWithSignalForms
#optionalfieldsWithSignalForms
Share this link via
Or copy link























