title: Ionic2, Angular2, HTTP and Observables
body: <p>After reading almost everything I found about observables, I still don't understand pretty well how they work. </p>
  
  <p>I am doing the http request here:</p>
  
  <pre><code>import { Component, OnInit, Injectable } from '@angular/core';
  import { Http, Response, Headers, RequestOptions } from '@angular/http';
  import { NavController } from 'ionic-angular';
  import { Observable } from 'rxjs/Rx';    
  import 'rxjs/add/operator/map';
  import 'rxjs/add/operator/catch';
  
  @Injectable()
  @Component({
    selector: 'page-home',
    templateUrl: 'home.html'
  })
  export class HomePage {
  
      webs: any;
  
      getWebs(): any{
          return this.http.get( 'here the url' )
          .map((res: Response) =&gt; res.json());
      }
  
      constructor(public navCtrl: NavController, private http: Http) {}
  
      ngOnInit(){
          this.getWebs().subscribe(response =&gt; {
              this.webs = response;
              console.log(this.webs);
          });
      }
  }
  </code></pre>
  
  <p>On the console, this.webs is correctly printed. That means, the get request ist working fine and I am retrieving the object I want. That is a normal JSON object.</p>
  
  <p>The problem is, on the view, if I try to print some property of the object (the same properties I see on the console) like that</p>
  
  <pre><code>{{ webs.name }}
  </code></pre>
  
  <p>I get the whole time that error:</p>
  
  <pre><code>Error in ./HomePage class HomePage - caused by: Cannot read property 'name' of undefined
  </code></pre>
  
  <p>That was sooo easy with Angular 1 :( I already read a lot of tutorials but I can't find any answer to my problem. </p>
  
  <p>Thanks for your help.</p>