How to set up HttpClient.

First, You have to import HttpClientModule in the root module.

After That, you can inject HttpClient in the services like this:

import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';

@Injectable()
export class ConfigService {
  constructor(private http: HttpClient) { }
}