Due to some infrastructure changes (namely servers & VPNs) there are times I want to run our application in an offline mode. I\'ve been able to implement this
That's the recipe I've used for whitelisting
app.run(function ($httpBackend) {
// mocked requests, should come first
$httpBackend.when('GET', 'mock').respond(200, {});
// whitelisted real requests, should come last
angular.forEach(['GET', 'DELETE', 'JSONP', 'HEAD', 'PUT', 'POST', 'PATCH'], function (method) {
$httpBackend.when(method).passThrough();
});
});
And I'm quite sure that precedence matters here.