W3cubDocs

/Angular

HttpClientJsonpModule

class stable

NgModule which enables JSONP support in HttpClient.

class HttpClientJsonpModule {
}

Description

Without this module, Jsonp requests will reach the backend with method JSONP, where they'll be rejected.

Annotations

@NgModule({ providers: [ JsonpClientBackend, { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext }, { provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true }, ] })

© 2010–2018 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/common/http/HttpClientJsonpModule