Reputation: 954
What is the best way to store/share application data across the application? I have a bunch of drop-down list that won't change very often but if they do I would reload them so I don't have to hit my web api unless the data is changed every.
Should I just create shared application service and store the data inside the service? I'm just wondering what the best practices are for this or what others are doing.
Upvotes: 1
Views: 435
Reputation: 767
Creating a service makes total sense.
If I add a small thing, I would make the data Observable using RxJs.
Here is the guide you can refer to https://coryrylan.com/blog/angular-observable-data-services
Upvotes: 1