var getOrders = function(){
var deferred = $q.defer();
$http({
method:'get',
url:'/getOrders',
headers: {'Cache-Control':'no-cache;max-age=0', 'Pragma': 'no-cache'}
}).then(function(response) {
deferred.resolve(response.data);
}, function(err) {
deferred.reject(err);
});
return deferred.promise;
};