Chuckatron
Chuckatron

Reputation: 306

Making user preferences available to the app

I have a bunch of user preferences that they can set via a view. These preferences, once set, are available via an API either individually by key or as a whole. I am contemplating how to make these preferences available to my app in a way that won't cause me to hit the API every time I need one.

I should say that a number of the preferences are user defined HTML templates and are, therefore, quite large.

It seems that storing the preferences in a service is the obvious way forward, but taking this as a given, I seemingly have a couple of ways forward, but am sure there must be others...

How do other people do this? Any advice or suggestions?

Upvotes: 1

Views: 176

Answers (1)

Ryan
Ryan

Reputation: 5983

I would grab the settings from the server when the app starts up and store them in session storage. Wouldn't be hard to roll your own or we have used ngStorage for similar things. https://github.com/gsklee/ngStorage

Upvotes: 1

Related Questions