function getQuery(){
var setupCache = $cacheFactory('setupServiceCache');
var deferred = $q.defer();
var CustomerName = setupCache.get("CustomerName");
if (!CustomerName || CustomerName.length === 0 ) {
$http({
url: serviceBase + 'GetCustomerName',
method: "GET",
params: { locationID: userInfo.locationID }
).then(
function (results) {
setupCache.put("CustomerName", results.data);
deferred.resolve(results.data);
});
} else {
deferred.resolve(CustomerName);
}
return deferred.promise;
}
function post(){
return $http.post(url + 'Delete', entity).then(function (result) {
return result;
}).catch(function (ex) {
throw ex;
});
}
1 Comments
Great Article
ReplyDeleteAngularjs Training | Angularjs Training in Chennai