title: Promise and subscribe
body: <p>I have an Angular2 (ionic2) application. I have a function that request cities but I get an error that Property subscribe does not exists on <code>this.cityService.getAllCities()</code>.</p>
  
  <p>cityPage.ts has a function like this:</p>
  
  <pre><code>getCities(){
      this.cityService.getAllCities()
            .subscribe(cityData =&gt; { this.cityList = cityData; },
              err =&gt; console.log(err),
              () =&gt; console.log('Complete!')
      );
  }
  </code></pre>
  
  <p>my cityService.getAllCities() function looks like this:</p>
  
  <pre><code>getAllCities(){
  
      return new Promise (resolve =&gt; {
          this.storage.ready().then(() =&gt; {
  
              this.storage.get('authData').then(authData =&gt; {
                let hdr = new Headers({'Content-Type': 'application/json', 'Authorization': 'Bearer ' +
                  authData.access_token });
                let opt = new RequestOptions({ headers: hdr });
                  return this.http.get(AppSettings.API_GET_CITIES).map(res =&gt; &lt;CityModel[]&gt; res.json(), opt);
              }).catch(() =&gt; {
                //resolve(false);
              });
  
          });
  
      });
  
    }
  </code></pre>
  
  <p><strong>Edit</strong></p>
  
  <p>Based on the comment I've changed my function like this:</p>
  
  <pre><code>getAllCities(){
  
      return Observable.create(resolve =&gt; {
          this.storage.ready().then(() =&gt; {
  
              this.storage.get('authData').then(authData =&gt; {
                let hdr = new Headers({'Content-Type': 'application/json', 'Authorization': 'Bearer ' +
                  authData.access_token });
  
                  console.log('access_token ' + authData.access_token);
                let opt = new RequestOptions({ headers: hdr });
                   return this.http.get(AppSettings.API_GET_CITIES,opt).map(res =&gt; &lt;CityModel[]&gt; res.json()).subscribe((result) =&gt; {
                    console.log(result);
                    resolve = result;
                  });
              }).catch(() =&gt; {
                //resolve(false);
              });
  
          });
  
      });
  
    }
  </code></pre>
  
  <p>In my <code>console.log(result)</code> I receive data, but the data is never returned to my <code>getCities()</code> function. Also the <code>console.log('Complete!')</code> is not called.</p>