title: How to fix ERROR Error: Uncaught (in promise): NullInjectorError: StaticInjectorError(AppModule)[HomeComponent -> HttpHeaders]
body: <p>While fetching from API call using GET method I am facing problem like this</p>
  
  <blockquote>
    <p>core.js:6014 ERROR Error: Uncaught (in promise): NullInjectorError: StaticInjectorError(AppModule)[HomeComponent -> HttpHeaders]: 
      StaticInjectorError(Platform: core)[HomeComponent -> HttpHeaders]: 
        NullInjectorError: No provider for HttpHeaders!
    NullInjectorError: StaticInjectorError(AppModule)[HomeComponent -> HttpHeaders]: 
      StaticInjectorError(Platform: core)[HomeComponent -> HttpHeaders]: 
        NullInjectorError: No provider for HttpHeaders!
        at NullInjector.get (core.js:855)
        at resolveToken (core.js:17513)
        at tryResolveToken (core.js:17439)
        at StaticInjector.get (core.js:17265)
        at resolveToken (core.js:17513)
        at tryResolveToken (core.js:17439)
        at StaticInjector.get (core.js:17265)
        at resolveNgModuleDep (core.js:30392)
        at NgModuleRef_.get (core.js:31577)
        at resolveDep (core.js:32142)
        at resolvePromise (zone-evergreen.js:797)
        at resolvePromise (zone-evergreen.js:754)
        at zone-evergreen.js:858
        at ZoneDelegate.invokeTask (zone-evergreen.js:391)
        at Object.onInvokeTask (core.js:39679)
        at ZoneDelegate.invokeTask (zone-evergreen.js:390)
        at Zone.runTask (zone-evergreen.js:168)
        at drainMicroTaskQueue (zone-evergreen.js:559)</p>
  </blockquote>
  
  <p>Code:</p>
  
  <pre><code>return this.http
        .get('http://localhost/advanced/frontend/web/leftside-menu/get-left-menu')
        .subscribe(
          (result) =&gt; { }
        );
  </code></pre>