For an angular app, I was previously loading all data before displaying any page through the ui-router resolve
. However, certain data was repeated, so I ended up caching the data via localStorage... but what would be the best way forward, in terms of combining the cache and promises to work together. Should I resolve a promise in the parent using the cache, and then simply use that promise throughout the app? Or should I resolve a promise separately using the cache in every single state? Or should I not even involve resolving promises for cacheable data, and simply call the cacheable data directly within each of the page controllers?
Any hints would be appreciated.