title: 'Employee' only refers to a type, but is being used as a value here.ts(2693)
body: <p>I am trying to create a variable of type Employee but it is showing an error of 'Employee' only refers to a type but is being used as a value here. ts(2693).</p>
  <p>My show-api.ts code:-</p>
  <pre><code>import { Component, OnInit } from '@angular/core';
  import {HttpClient} from '@angular/common/http';
  
  interface Employee {
      Id: String;
      EmployeeName: String;
      StartTimeUtc: String;
      EndTimeUtc: String;
      EntryNotes: String;
      DeletedOn: String;
  }
  
  
  @Component({
  selector: 'app-show-api',
  templateUrl: './show-api.component.html',
  styleUrls: ['./show-api.component.css']
  })
  
  
  export class ShowApiComponent implements OnInit {
  
  li:any;
  lis: any=[];
  
  
  constructor(private http : HttpClient){
      
  }
  
  ngOnInit(): void {
      this.http.get('Api of my JSON file')
      .subscribe(Response =&gt; {
  
      
      if(Response){
          hideloader();
      }
  
      **employee: Employee[]=Response**;
  
  
      
      });
      function hideloader(){
      document.getElementById('loading')!.style.display = 'none';}
  }}
  
  </code></pre>
  <p>data from API</p>
  <pre><code>[
  
  {&quot;Id&quot;: &quot;aa&quot;,
  &quot;EmployeeName&quot;: &quot;bb&quot;,
  &quot;StarTimeUtc&quot;: &quot;cc&quot;,
  &quot;EndTimeUtc&quot;: &quot;dd&quot;,
  &quot;EntryNotes&quot;: &quot;ee&quot;,
  &quot;DeletedOn&quot;: null },
  
  {&quot;Id&quot;: &quot;ff&quot;,
  &quot;EmployeeName&quot;: &quot;gg&quot;,
  &quot;StarTimeUtc&quot;: &quot;hh&quot;,
  &quot;EndTimeUtc&quot;: &quot;ii&quot;,
  &quot;EntryNotes&quot;: &quot;jj&quot;,
  &quot;DeletedOn&quot;: null },
  
  ]
  
  </code></pre>
  <p>Also, if this is not solvable, please tell me an alternative way to get data from JSON file.</p>