Search code examples
angularjsangular-mock

angular mocke2e, how to send real ajax, not caught by httpbackend


angular mocke2e, how to send real ajax, not caught by httpbackend?
I may want to send both mock and real ajax in my development.


Solution

  • You can passThrough any call came into httpBackend with its inbuilt method.

    $httpBackend.whenGET('AnyCall.html').passThrough();
    

    More reference link.