Loading...
Angular computed signal doesn’t update when I push to an array
asked 4 hours ago
0
6
I’m trying signals in Angular for the first time. I have a list of todos in a signal and a computed signal that counts the open ones. When I add a todo, the list in the template updates, but the counter stays at the old number.
ts
html
I thought computed() tracks the signal automatically. Do I have to call something to trigger it, or am I using signals the wrong way?
Angular version is 18.
0 Answers


No Answers Found
The answer board is empty. Make it rain with your brilliant answer.
1