Check out example codes for "angular No provider for HttpClient". It will help you in understanding the concepts better.

Code Example 1

// open the root app.module.ts,
import { HttpClientModule } from '@angular/common/http';

// add it to the @NgModule.imports array.
imports:[HttpClientModule,  ]

Code Example 2

import { HttpClientModule } from '@angular/common/http';

Code Example 3

import { HttpClientModule } from '@angular/common/http';

Learn ReactJs, React Native from akashmittal.com