title: Angular MatTableDataSource Error
body: <p>I got an error like this :</p>
  
  <blockquote>
    <p>[ts] Argument of type 'Company' is not assignable to parameter of type
    'Company[]'.   Property 'includes' is missing in type 'Company'.</p>
  </blockquote>
  
  <p>When I'd like to insert an Array Object into MatTableDataSource. This is my TypeScript file :</p>
  
  <pre><code>import { Component, OnInit, ViewChild } from '@angular/core';
  import { MatTableModule } from '@angular/material/table';
  import { MatTableDataSource, MatPaginator, MatSort } from '@angular/material';
  import { CompanyService } from '../../../services/company.service';
  import { AuthService } from '../../../services/auth.service';
  import { DataSource } from '@angular/cdk/collections';
  import { Company } from '../../../models/company.model';
  import { Observable } from "rxjs";
  import { Router } from '@angular/router';
  import { filter } from 'rxjs/operators';
  @Component({
    selector: 'app-index-company',
    templateUrl: './index-company.component.html',
    styleUrls: ['./index-company.component.css']
  })
  
  export class IndexCompanyComponent implements OnInit {
    company   : Object;
    companies : Object;
    displayedColumns = ['perusahaan', 'kategori', 'mahasiswa', 'option'];
    dataSource: MatTableDataSource&lt;Company&gt;;
    @ViewChild(MatPaginator) paginator: MatPaginator;
    @ViewChild(MatSort) sort: MatSort;
  
    applyFilter(filterValue: string) {
      filterValue = filterValue.trim(); 
      filterValue = filterValue.toLowerCase();
      this.dataSource.filter = filterValue; 
    }
    constructor(
      private companyService: CompanyService,
      private authService: AuthService,
      private router: Router
    )
    {
        this.companyService.getCompanies().subscribe(companies =&gt; {
        this.companies = companies;
        this.dataSource = new MatTableDataSource(companies);
      },
      err =&gt; {
        console.log(err);
        return false;
      });
    }
  
    ngOnInit() {
    }
  }
  </code></pre>
  
  <p>And this is my Company models :</p>
  
  <pre><code>export class Company{
      perusahaan       : String;
      alamat           : String;
      deskripsi        : String;
      telepon          : String;
      email_perusahaan : String;
      website          : String;
      students         = [];
      kategori         : String;
      author           : String;
      update_by        : String;
      status           : String;
  }
  </code></pre>
  
  <p>Edited. CompanyService addded :</p>
  
  <pre><code>  getCompanies(): Observable&lt;Company&gt;{
      let headers = new Headers();
      headers.append('Authorization', this.authToken);
      headers.append('Content-Type', 'application/json');
      return this.http.get(this.baseUri+'/companies', {headers: headers})
      .map(res =&gt; res.json());
    }
  </code></pre>