Adding the HTTPClient module and RxJS to our project

The Angular HTTPClient module is included in the Angular bundles that you have already installed. To use it, we need to import it into app.module.ts, like so (make sure that the import follows BrowserModule):

import { HttpClientModule } from '@angular/common/http';
. . . 
@NgModule({ 
  imports: [ 
    BrowserModule,
    HttpClientModule, 
. . . 
})

We also need an external third-party library: Reactive Extensions for JavaScript (RxJS). RxJS implements the Observable pattern and it is used by Angular with the HTTPClient module. It is included in the Angular bundles that are already part of our project.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.3.208