You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which @angular/* package(s) are the source of the bug?
common, core
Is this a regression?
No
Description
The new Signal Api has a computed function that expect to be reactive, based on encapsulated Signals.
I have some use case here it's not refreshed. I expected toSignal to be the root of the problem, but it appears that it also failed with simple signal value.
usersSignal is note recomputed when usersSignalStore is modified.
In a template, i can do {{usersSignalStore().length}} and it will work. But using {{ usersCountCompute() }} will display 1 at first time, but will never be refreshed.
Please provide a link to a minimal reproduction of the bug
Hi, this behavior is expected.
You're mutating your array in your add method with usersSignal.push('simple signal');.
Signals check the reference by default (if you don't provide a compare function).
Which @angular/* package(s) are the source of the bug?
common, core
Is this a regression?
No
Description
The new Signal Api has a
computed
function that expect to be reactive, based on encapsulated Signals.I have some use case here it's not refreshed. I expected
toSignal
to be the root of the problem, but it appears that it also failed with simplesignal
value.usersSignal is note recomputed when usersSignalStore is modified.
In a template, i can do {{usersSignalStore().length}} and it will work. But using {{ usersCountCompute() }} will display 1 at first time, but will never be refreshed.
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/stackblitz-starters-fdzu8r
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response
The text was updated successfully, but these errors were encountered: