title: How to hide an API Key with Angular 8.0.2
body: <p>I'm trying to call the twitch API. To call this api we need to specify a user key. How can i hide the key in my code? I have no idea how to do.</p>
  
  <pre><code>Package                      Version
  ------------------------------------------------------
  @angular-devkit/architect    0.800.2 (cli-only)
  @angular-devkit/core         8.0.2 (cli-only)
  @angular-devkit/schematics   8.0.2 (cli-only)
  @schematics/angular          8.0.2 (cli-only)
  @schematics/update           0.800.2 (cli-only)
  rxjs                         5.5.12
  </code></pre>
  
  <p>in my app.component.ts file</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { HttpClient, HttpHeaderResponse, HttpHeaders, HttpResponse, HttpErrorResponse } from '@angular/common/http';
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.scss']
  })
  export class AppComponent implements OnInit {
    title = 'TwitchApp';
    twitch_api_key:string = 'test';
    twitch_api_Url:string = 'https://api.twitch.tv/helix/users?id=44322889';
    limit:string = '10';
  
    constructor(private http: HttpClient,){}
  
    ngOnInit(){
      this.request();
    }
    request(){
      let header = new HttpHeaders({
        'Client-ID': this.twitch_api_key
      })
      var options = {headers: header}
      this.http.get(this.twitch_api_Url,options).subscribe(
        res =&gt; {
          console.log(res)
        },
        (err: HttpErrorResponse) =&gt; {
          console.log(err.error);
          console.log(err.name);
          console.log(err.message);
          console.log(err.status);
        }
      )
    }
  }
  </code></pre>
  
  <p>In the main.js in web browser</p>
  
  <pre><code>    constructor(http) {
          this.http = http;
          this.title = 'TwitchApp';
          this.twitch_api_key = 'test';
          this.twitch_api_Url = 'https://api.twitch.tv/helix/users?id=44322889';
          this.limit = '10';
      }
  </code></pre>
  
  <p>Thanks</p>