mercredi 21 octobre 2015

$httpBackend.whenRoute is not a function error

I have the following http GET request:

http://ift.tt/1GqeMbB

and I'm trying to match it this way:

$httpBackend.whenRoute('GET', 'http://ift.tt/1GUiBAP')
  .respond(function(method, url, data, headers, params){
      return {templates: [{status: 'available'},{status: 'not_available'}]};
  });

But I am getting the error message "$httpBackend.whenRoute is not a function".

I followed the example here: http://ift.tt/V2E0X0$httpBackend Am I missing something?

Thank you!

Aucun commentaire:

Enregistrer un commentaire