angular - Call a memoized function using toSignal from the template - Stack Overflow

admin2025-04-21  2

I want to use a SignalStore method to generate a signal from an observable. The function is memoized so I don't make a ton of subscriptions to the observable. When I call the method from the template I get this error NG0602: toSignal() cannot be called from within a reactive context. I have mitigated the risk by memoizing, how can I get around the error?

转载请注明原文地址:http://anycun.com/QandA/1745225947a90462.html