title: Angular - Delete data from a restfull webservice using observables
body: <p>I'd like to delete data from a restfull webservice with angular. I was using the method which is provided on the angular tutorial site:</p>
  
  <pre><code>delete(id: number): Promise&lt;void&gt; {
      const url = `${this.heroesUrl}/${id}`;
      return this.http.delete(url, {headers: this.headers})
      .toPromise()
      .then(() =&gt; null)
      .catch(this.handleError);
  }
  </code></pre>
  
  <p>It is working but I'd like to do the same using observables instead of promises. I've tried this but it is not working:</p>
  
  <pre><code>delete(id: number) {
      const url = '${this.heroesUrl}/${id}';
      return this.http.delete(url).map(
          response =&gt; {},
          error =&gt; console.log(error)
      );
  }
  </code></pre>