Matt Kruse
unread,Feb 20, 2013, 2:50:10 PM2/20/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ang...@googlegroups.com
Most apps contain static data, such as dropdowns of countries or states. What is the best way to store this data so it can be used in any template?
Should I create a service which provides the list values? Or load them into $rootScope? Or some other way?
Let's say I have a complex app that may have hundreds of static lists. How would I lazy-load those lists on demand, rather than having to bulk-load them on app startup?
And because apps are not so easy, let's say I have server-side admin controls to manipulate those list values. So the admin might make a new option for "car color" - how do I make sure the app reflects the change as soon as possible, rather than caching the values indefinitely or waiting for a page reload?
Thanks,
Matt Kruse