title: Angular 4 Error : Property 'includes' is missing in type '() => any'
body: <p>I am getting error while using angular 4 and observable. </p>
  
  <p>/Users/<em>/backend/src/app/app.component.ts (15,55): Type '() => any' is not assignable to type 'State[]'.
  /Users/</em>/backend/src/app/app.component.ts (15,55): Type '() => any' is not assignable to type 'State[]'.
    Property 'includes' is missing in type '() => any'.</p>
  
  <p>What am I doing wrong</p>
  
  <p>My Model </p>
  
  <pre><code>export class State {
    id: number;
    state: string;
    code: string;
  }
  </code></pre>
  
  <p>My Service </p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { Http, Response } from '@angular/http';
  import 'rxjs/add/operator/map';
  import 'rxjs/add/operator/do';
  import 'rxjs/add/operator/toPromise';
  
  import {environment} from '../../../environments/environment';
  
  @Injectable()
  
  export class StateService {
    private baseUrl: string = environment.baseUrl;
  
    constructor( private http: Http) {}
  
    /**
     * Get all States
     */
    GetStates() {
     return this.http.get(this.baseUrl + 'v1/states')
        .map((res: Response) =&gt; res.json);
       // .do( data =&gt; console.log(data));
    }
  }
  </code></pre>
  
  <p>My Component </p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import {StateService} from './shared/services/state.service';
  import {State} from './shared/models/state';
  
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styles: []
  })
  export class AppComponent implements OnInit {
     states: State[] ;
    constructor(private stateService: StateService) {}
  
    ngOnInit() {
      this.stateService.GetStates().subscribe(states =&gt; this.states = states );
    }
  }
  </code></pre>
  
  <p>App.Module</p>
  
  <pre><code>import { BrowserModule } from '@angular/platform-browser';
  import { NgModule } from '@angular/core';
  import { FormsModule } from '@angular/forms';
  import { HttpModule } from '@angular/http';
  import 'rxjs/add/operator/map';
  
  import { AppRoutingModule } from './app-routing.module';
  import { AppComponent } from './app.component';
  import { StateService } from './shared/services/state.service';
  @NgModule({
    declarations: [
      AppComponent
    ],
    imports: [
      BrowserModule,
      FormsModule,
      HttpModule,
      AppRoutingModule
    ],
    providers: [
      StateService
    ],
    bootstrap: [AppComponent]
  })
  export class AppModule { }
  </code></pre>