title: Angular 5 Typescript says webpack failed as Property data does not exists on type Response
body: <p>I seem to get an error with webpack compiling.  It compiles if I remove <code>.data</code> but then the page blows up with the calls from template->component (which calls a service </p>
  
  <p>Error I am getting </p>
  
  <blockquote>
    <p>ERROR in src/app/components/app-landing-page/app-landing-page.component.ts(95,41): error TS2339: Property 'data' does not exist on type 'Response'.</p>
  </blockquote>
  
  <pre><code> webpack:  Failed to compile 
  </code></pre>
  
  <p>That is when my component has </p>
  
  <pre><code>this.referrals = result.data;
  </code></pre>
  
  <p>component:</p>
  
  <pre><code>this.arsSevice.getArsCodesApi(this.model)
      .subscribe(
          result =&gt; {
  
              this.referrals = result.data;
              console.log('component',result);
          })
  </code></pre>
  
  <p><strong>Service:</strong></p>
  
  <pre><code>getArsCodesApi(search: arsCodes) {
      return this.http.post(this.serviceUrl, JSON.stringify(search), httpOptions)
      JSON.stringify(search), options)
          .map((response: Response) =&gt; {
              return response;              
          })
    }
  </code></pre>
  
  <p><strong>FYI   http is the new  httpclient</strong></p>
  
  <p>Once I compile it without .data  -- running with <code>ng serve --open</code>  then i have to add .data back in  </p>
  
  <p>If I don't add it, the call fails to work and i get this error</p>
  
  <blockquote>
    <p>Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays.</p>
  </blockquote>
  
  <p><strong>WHY???</strong> ( console.log  clearly shows that that is data : Array(16)  )</p>
  
  <p><strong>Edit Update</strong>   showing console.log of data</p>
  
  <p><a href="https://i.stack.imgur.com/zrtEJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zrtEJ.png" alt="screenshot of console.log  data array"></a></p>