I just encountered with your channel. linkedSignal might be good. I already use most of the signals features in production, but still have some issues, like: 1. viewChild signal returns inner component with a signal. And if I want to make computed signal based on inner component, I can’t, because there is the signal inside the signal. So, for this case I use the decorator ViewChild. 2. reactive forms are great, but don’t support signals (e.g. valueChanges). I hope it will change in the future
I often had to fall back to a more procedural approach and add code to an event. Something like this: onProductSelected(p: Product) { this.selectedProduct.set(p); this.quantity.set(1); } But then I'd also have to add the code to reset the quantity anywhere else the product could change, such as deep linking. With linkedSignal, we can declaratively define the quantity and when it should reset. No need to add code anywhere the selected product could change.
The model() is for two-way binding with a child component. The linkedSignal() works with or without child components. It allows one signal to affect another without making it read-only or having to use an effect.
Thanks @Deborah,
We always love your interesting videos.
And as always, we hope all the features of Angular19 come through your channel first!!!
I never saw any value in using signals, but after watching your videos I simply love it and want to use it everywhere! Thank you for that!
Great to hear! Thanks for watching!
This is gonna be a game changer. Looks more readable and intuitive. Thank you
Yes! Great addition to the signal feature set.
Always love ur videos Deborah. Interesting topic here…thx for the heads up
Thanks! I expect to post more about it when it lands in a release.
Great material from the best angular teacher.
I can't wait to use this feature.
Thank you!
Yes! Looking forward to trying it out.
I am the one waiting for your tips always.
Thank you!
That's a great alternative for using effect!
Yes! 😊
I just encountered with your channel. linkedSignal might be good.
I already use most of the signals features in production, but still have some issues, like:
1. viewChild signal returns inner component with a signal. And if I want to make computed signal based on inner component, I can’t, because there is the signal inside the signal.
So, for this case I use the decorator ViewChild.
2. reactive forms are great, but don’t support signals (e.g. valueChanges). I hope it will change in the future
Welcome!
Yes, the Angular team has said that they plan to revisit forms and provide a better integration with signals. Hope it's soon!
Yeah i felt the need for it since the begginig 😅 where i would use effect to write to signals to achieve the same effect
Yep! This is a great addition to the signal feature set.
Thanks for sharing this, ❤ your content as always. Is there any RFC for this, with more details on what Angular team is discussing on this?
Thank you! I would expect to see more info from the team in the next few days. I'll add the RFC link to the video notes when it's available.
@@deborah_kurata thank you
I think for http requests the upcoming resource primitive is a better fit than linkedSignal
I'm currently planning to cover resource and rxResource in my next video.
Great vid, teacher. What about the new resources api? Will you record a video too? It works like tanstack query. 😀
Thank you!
Yes, my current plan is to cover resource and rxResource in my next video.
I'm a big fan
Thank you so much! 😊
How did you solve this kind of problem without the linkedSignal?
The way I found was to convert the signal to observable and then updating the value.
I often had to fall back to a more procedural approach and add code to an event.
Something like this:
onProductSelected(p: Product) {
this.selectedProduct.set(p);
this.quantity.set(1);
}
But then I'd also have to add the code to reset the quantity anywhere else the product could change, such as deep linking.
With linkedSignal, we can declaratively define the quantity and when it should reset. No need to add code anywhere the selected product could change.
Teacher 💙
😊
looks like a more complicated version of model()
The model() is for two-way binding with a child component. The linkedSignal() works with or without child components. It allows one signal to affect another without making it read-only or having to use an effect.