title: How to use promise with angular 2 and loopback?
body: <p>Here shows the project done in angular2 framework with loopback.
  I want to use promise along with data retrieved using loopback.</p>
  
  <p>data.component.ts</p>
  
  <pre><code>ngOnInit () {
  this.dataService.getAllData()
  .then(response =&gt; {this.data.push(response);});
  }
  </code></pre>
  
  <p>data.service.ts</p>
  
  <pre><code>public getAllData(): any {
      this.my_model.find()
      .toPromise()
      .then((res : Response) =&gt; res);
  
  }
  </code></pre>
  
  <p>I want to interpolate this data to the html view.
  How to do this?</p>