Advertisement
Guest User

Untitled

a guest
Aug 27th, 2014
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             var count = 1;
  2.             $httpBackend.when('GET', '/getlist', {}).respond(function(method, url, data, headers) {
  3.                 console.log("count:" + count);
  4.                 if(count==1) {
  5.                     count = count + 1;
  6.                     console.log("increase count");
  7.                     return [200, '[{"first":"1"}, {"second":"2"}]', {}];
  8.                 }
  9.                 return [200, '[{"item-id": "003", "item-user": "Test User"},{"first":"1"}, {"second":"2"}]', {}];
  10.             });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement