Skip to content

Instantly share code, notes, and snippets.

@gsans
Created November 21, 2014 00:45
Show Gist options
  • Save gsans/f1072d04486b17941549 to your computer and use it in GitHub Desktop.
Save gsans/f1072d04486b17941549 to your computer and use it in GitHub Desktop.
.run(function($httpBackend, Users) {
//mock users api
$httpBackend.whenGET('/api/users')
.respond( Users.get() );
//you can mock GET, POST, HEAD, PUT, DELETE, PATCH, JSONP. See $httpBackend help.
// allow other requests to use $http. Eg: templates
$httpBackend.whenGET(/.tpl.html$/).passThrough();
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment