angular http

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

@Injectable()
export class ConfigService {
  constructor(private http: HttpClient) { }
}import { HttpClientModule }    from '@angular/common/http';
...
@NgModule({
  imports: [
    HttpClientModule,
  ],
})    Here how the request flow while executing angular app:
main.ts  >>   app.Module.ts  >>  app.component.ts  >>  index.html  >>  app.component.html  
Source

Also in JavaScript: