I need you to clear the cache always. But when I create, update or delete a client, always get the same result. Only when I delete the cache manually (Ctrl+Shift+Supr) I can see 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(
//success
function (value) {
$rootScope.clients= value;
},
//error.
function (error) {
alert(error);
}
);
}]);