title: How do I bind data in HTML in angular 4 since getting data in response after minutes
body: <p>I wanted to bind data in HTML file which I'm getting in following response. I get response in network tab but HTML not binding it in HTML. Giving me error saying Cannot read property 'length' of undefined</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import { Component, OnInit, Output } from '@angular/core';
  import { Http, Response } from '@angular/http';
  import 'rxjs/add/operator/map';
  
  import { myService } from '../myService.service';
  @Component({
    selector: 'app-data-display',
    templateUrl: './data-display.component.html',
    styleUrls: ['./data-display.component.css']
  })
  export class dataDisplayComponent implements OnInit {
   dataDisplayResults:any=[];
   Json:any = [];
   requestURL: string = "";
   queryString:any;
   responce:any;
    constructor(private myServiceVar:myService){ 
     let re = /[?&amp;]([^=#&amp;]+)=([^&amp;#]*)/g;
   let match;
   let isMatch = true;
   let matches = [];
   while (isMatch) {
       match = re.exec(window.location.href);
       if (match !== null) {
           matches[decodeURIComponent(match[1])] = decodeURIComponent(match[2]);
           if (match.index === re.lastIndex) {
               re.lastIndex++;
           }
       }
       else {
           isMatch = false;
       }
   }
   this.queryString = matches;
  
   this.myServiceVar.getJsonConstants().subscribe(Jsons =&gt;
    
    this.myServiceVar.getURLResponce(Jsons.domain+Jsons.Url +"?user="+this.queryString["user"]).subscribe(respData =&gt; 
     this.dataDisplayResults = respData   
    )
      
   )
    }
  
    ngOnInit(){ 
     
  
    }
  
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div *ngIf="dataDisplayResults.length"&gt;{{dataDisplayResults.date}}&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>