Angular produces this error when you attempt a JSONP
request without providing the necessary support for it in the HttpClient
configuration. To enable JSONP
support, you can do one of the following:
withJsonpSupport()
as an argument during the provideHttpClient
function call (e.g. provideHttpClient(withJsonpSupport())
) when bootstrapApplication
is usedHttpClientJsonpModule
in your root AppModule, when NgModule-based bootstrap is used.Make sure that the JSONP support is added into your application either by calling the withJsonpSupport()
function (when the provideHttpClient()
is used) or importing the HttpClientJsonpModule
module as described above.
See Make a JSONP request for more info.
© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/errors/NG02800