Рет қаралды 12,284
We often work with sets of data stored in an array. With the new Angular signals feature, we can work with an array as a signal. That gives us better reactivity, and improved change detection.
In this video, we walk through how to create a signal that contains an array, and then update that signal: inserting, updating, and deleting items in that array.
*Links*
Code: github.com/DeborahK/Angular-Signals
"Angular Signals: What, Why, and How?": kzbin.info/www/bejne/paK8gnpthrKXsNk
"RxJS and Angular Signal Fundamentals" - Pluralsight course: www.pluralsight.com/library/courses/rxjs-angular-signals-fundamentals
*Content*
00:00 Working with arrays in Angular signals
00:34 Demo
00:58 Creating the cart as an array in a signal
01:57 Adding items to the cart (the wrong way!)
03:57 Adding items to the cart (the right way!)
05:26 Removing items from the cart
05:54 Updating an item in the cart
07:18 Wrap up/Key Point
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
😊About Me
Hey! I'm Deborah Kurata
I'm a software developer and KZbin content creator. I speak at conferences such as VS Live and ng-conf. I write articles for freeCodeCamp. And I'm a Pluralsight author with courses in the top 10 most popular (out of 10,000+) over the past 5 years. 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).
Contact me on Twitter: DeborahKurata
Find my Pluralsight courses: www.pluralsight.com/profile/author/deborah-kurata
Access my freeCodeCamp articles: www.freecodecamp.org/news/author/deborah-kurata/
View my KZbin content: www.youtube.com/@deborah_kurata