linkHttpClientJsonpModule
npm Package | @angular/common |
---|---|
Module | import { HttpClientJsonpModule } from '@angular/common/http'; |
Source | common/http/src/module.ts |
linkOverview
class HttpClientJsonpModule {
}
linkDescription
NgModule
which enables JSONP support in HttpClient
.
Without this module, Jsonp requests will reach the backend with method JSONP, where they'll be rejected.
linkAnnotations
@NgModule({
providers: [
JsonpClientBackend,
{ provide: JsonpCallbackContext, useFactory: jsonpCallbackContext },
{ provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true },
]
})