ngMockE2E.$httpBackend.whenJSONP()

whenJSONP(url, [keys]);

Creates a new backend definition for JSONP requests. For more info see when().

Parameters

Param Type Details
url stringRegExpfunction(string)

HTTP url or function that receives a url and returns true if the url matches the current definition.

keys
(optional)
Array

Array of keys to assign to regex matches in request url described on $httpBackend mock.

Returns

requestHandler

Returns an object with respond and passThrough methods that control how a matched request is handled. You can save this object for later use and invoke respond or passThrough again in order to change how a matched request is handled.

doc_AngularJS
2016-03-29 16:12:11
Comments
Leave a Comment

Please login to continue.