title: Angular 6 - Promise<any> is not assignable to type LeagueTable
body: <p>New to Angular and I'm trying to get the JSON League Table data from the api but I am getting <strong>Type 'Promise' is not assignable to type 'LeagueTable'</strong>.</p>
  
  <p><strong>leaguetable.service.ts</strong></p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { HttpClient, HttpHeaders } from '@angular/common/http';
  import { map } from 'rxjs/operators/map';
  
    const baseUrl = 'http://api.football-data.org/v1';
  
  @Injectable({
    providedIn: 'root'
  })
  export class LeaguetableService {
  
   constructor(private http: HttpClient) { }
  
    getLeagueTable() {
      let headers = new HttpHeaders();
      headers = headers.set('X-Auth-Token', 'apikey');
      return this.http.get(baseUrl +'/competitions/445/leagueTable', { headers: headers })
     .pipe(map((res: Response) =&gt; res.json()));
    }
  
  }
  </code></pre>
  
  <p><strong>leaguetable.component.ts</strong></p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { LeagueTable } from '../league-table';
  import { LeaguetableService } from '../leaguetable.service';
  
  @Component({
    selector: 'app-leaguetable',
    templateUrl: './leaguetable.component.html',
    styleUrls: ['./leaguetable.component.css']
  })
  export class LeaguetableComponent implements OnInit {
  
    leagueTable: LeagueTable;
  
    constructor(private leagueTableService: LeaguetableService) { }
  
    ngOnInit() {
      this.getLeagueTable();
    }
  
    getLeagueTable() {
      this.leagueTableService.getLeagueTable().subscribe(leagueTable =&gt; this.leagueTable = leagueTable);
    }
  }
  </code></pre>
  
  <p><strong>league-table.ts</strong></p>
  
  <pre><code>export class LeagueTable {
    leagueCaption: string;
    matchday: number;
    standing: ({ 
      rank: number;
      team: string;
      teamId: number;
      playedGames: number;
      crestURI: string;
      points: number;
      goals: number;
      goalsAgainst: number;
      goalDifference: number;
    })
  }
  </code></pre>
  
  <p>I'm not exactly sure why this is happening, any help is appreciated!</p>
  
  <p>EDIT: Added class file for more clarification.</p>