It is crucial for the cache to be cleared consistently. However, no matter if a client is created, updated, or deleted, the same result always occurs. Only when I manually delete the cache (Ctrl+Shift+Supr), am I able to view the new data.
.factory('Clients', ['$resource', function ($resource) {
return $resource(pathApi, {}, {
query: {
method: 'GET',
isArray: false
}
});
}])
angular.module('app.controllers').controller('controller', ['$scope','Clients', function ($scope, Clients) {
Clients.get().$promise.then(
//successful
function (value) {
$rootScope.clients = value;
},
//error handling
function (error) {
alert(error);
}
);
}]);