Currently, I am upgrading my Angular project4 using webpack to Angular7.
I stuck in one step
Switch from
HttpModule
and theHttp
service toHttpClientModule
and theHttpClient
service.HttpClient
simplifies the default ergonomics (You don't need to map to json anymore) and now supports typed return values and interceptors.
About this step I need to replace
HttpModule
=> HttpClientModule
Http
=> HttpClient
Http
=> HttpClient
, are there any script to help like $rxjs-5-to-6-migrate -p src/tsconfig.app.json
or we need to edit manually?just change your imports from HttpModule to HttpClientModule and Http to HttpClient
import {HttpClientModule} from '@angular/common/http'
import {HttpClient} from '@angular/common/http'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With