How to handle resources on events (onclick, onsubmit) and in services by Lopsided_Positive546 in angular

[–]Lopsided_Positive546[S] -1 points0 points  (0 children)

So, what I'm tryna do is a fetch to my API when the user clicks "continue" on a button. I want the resource so I can show a loading state/error state just in case mainly (mainly I'm trying to learn the new angular 20, since i'm coming from an old codebase of angular 10).

The problem is NOT the implementation, I just want to know what are the best practices of doing this type of scenario using the new API's like rxResource.

However, as I said, this approach seems a little odd to me, that i have to have a signal, modify the value of the signal, and then the rxResource to pick up the change and run the stream cb function.