Call a memoized function using toSignal from the template

Discussão em 'Angular' iniciado por mgm87, Janeiro 22, 2025.

  1. mgm87

    mgm87 Guest

    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?

    Continue reading...

Compartilhe esta Página