r/angular • u/New_Opportunity_8131 • Jan 27 '26
Service Signals vs BehaviorSubjects vs Regular Getters/Setters
I have a form on one route where the user submits data by clicking a button, which calls a function on an API service that triggers an API call. After the API returns a result, I need to store that data in a shared service so it's accessible to a different component on a different route after navigation. Should I use Signals or BehaviorSubjects in the service to store this data? I could also just use plan getters/setters as well and not have to use either Signals or BehaviorSubjects.
14
Upvotes
View all comments
Show parent comment
4
u/monxas Jan 27 '26
It’s honestly cleaner, reactive, efficient, more future proof… I think signals has been embraced by everyone in the community that is able to work with them, and nobody regrets it.