Synchronizing Select Boxes with an Angular Signal Effect
Syncing multiple select boxes isn't always easy, especially when they are populated from HTTP requests. In this video, we'll first take a procedural approach to synchronizing select boxes with signals. Then change to a reactive approach, using a signal effect. Links Sample code (procedural approach): https://stackblitz.com/~/edit/sync-se... Sample code (effect approach): https://stackblitz.com/~/edit/sync-se... Sample code (Subject approach): https://stackblitz.com/~/edit/sync-se... Angular Docs: https://angular.dev/guide/signals#eff... Content 00:00 Syncing multiple select boxes 00:24 Sample Application 01:27 Populating the primary select box with toSignal() 03:15 Syncing the secondary select box (procedural) 07:09 Syncing the secondary select box (signal effect) 09:38 Wrap up NOTE The golden rule is to always unsubscribe if you subscribe. Even though the http request is "one and done" and therefore completes, it's a good idea to unsubscribe. I didn't include it in order to keep the video shorter/more focused. But if you look at the sample code (referenced above), you'll see that I use takeUntilDestroyed. And since I have the code in a method (not a constructor), I have to use DestroyRef. ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ 😊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 with courses in the top 10 most popular (out of 7,000+) for over 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). View my YouTube content: / @deborah_kurata Contact me on Twitter: / deborahkurata Find my Pluralsight courses: https://www.pluralsight.com/profile/a... Access my freeCodeCamp articles: https://www.freecodecamp.org/news/aut... ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ #angular #angulartutorials #angular16tutorial #effectsinangularsignals #dependentselectboxes #angulardependentselectboxes #angularselect #angularsynchronizetwocomboboxes #angularsynchronizetwoselectboxes #angularsynctwocomboboxes #angularsynctwoselectboxes

A Redux-like Pattern for Managing State with Angular signals

Angular Signals: What? Why? and How?

Lesson 11: SSH into AWS with VS Code (Plus Advanced Git Branch Tricks)

Why Aliens Would NEVER Invade Africa

Angular 21 Signal Forms Tutorial: Validation and Real-Time Binding

When Should We (NOT) Use a Signal effect()?

Billionaire's WARNING: I'm SELLING. The Crash Is Already Here!

bounce + bounce = no bounce

Angular 22 @Service vs @Injectable (what you need to know)

First Look at Angular's new resource() and rxResource()

What’s new in Angular v22

I Outsmarted Pro Car Thieves

Manage State with Angular Signals

Angular’s new injectAsync() API explained

Japan – Schweden Highlights | Gruppe F, FIFA WM 2026 | sportstudio

What Ukraine Just Did to Putin's Su-57s Is CRAZY… They Are DONE

Content Projection in Angular - Complete Guide (Beginners/Advanced)

