You have a few different options of storing data client side. You most certainly should put all your ajax calls into a service regardless of which you choose, this will make maintenance much easier.
1: Make use of $http cache. This is a simple in memory store built into the $http service. When implemented you continue to make your $http calls as usual but will respond with data in the store if available. The cons are its in memeory so takes up resources and will be lost if the user clicks 'X'
https://docs.angularjs.org/api/ng/service/$http#caching
2: LocalStorage/SessionStorage
Most modern browsers now support LocalStorage and SessionStorage quite well. Its reasonably fast and has an incredibly simple API. It is also synchronous so very simple to implement. The down side is it doesn't have much capacity and you store your data in key value pairs where the data must be a string. So you have to turn your data into JSON first. SessionStorage is wiped when the user's session ends, however LocalStorage will persist until the user clears it or you do in code.
https://developer.mozilla.org/en/docs/Web/API/Window/sessionStorage
3: IndexedDB
Most modern browsers support this but less so than LocalStorage. This is the go to choice (In My opinion) for large amounts of client data storage. It is essentially a full blown client database. You have collections, transactions queries, index's. It is fully asynchronous. the down side to this power is complexity and it requires allot more boilerplate code connecting and dealing with DB version upgrades. Ive used it allot in the past with browser based video games.
https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API
4: Roll your own
Lastly there is the option of mixing any of these methods up. Thanks to angular's powerful interceptor system you could implement your own $http caching levering localSotrage or indexedDB or in memory giving you much more control over the cache then the default.
https://docs.angularjs.org/api/ng/service/$http#interceptors
Or you could just store the data in your service.
.service('user', function ($http, $q) {
var user;
this.getUser = function () {
if (!user) {
return $http.get('/user')
.then(function (data) {
user = data;
return data;
});
} else {
return $q.when(user);
}
}
});
hope that helps, also go easy this is my first sort of write up answer.