Questions
Q:

Angular Component not render html when add constructor

When I add a private http: HttpClient  inside the constructor, the Angular component not render. why is this happen.

1 Answers

1
Accepted

Check that in your app module you have imported the "HttpClientModule",

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



imports: [

    HttpClientModule

  ],

After that you add module stil component not rendering you have to post error message here.