import { Injectable } from '@angular/core'; import { Headers, Http } from '@angular/http'; import 'rxjs/add/operator/toPromise'; import { Hero } from './hero'; @Injectable() export class HeroService { private heroesUrl = 'app/heroes'; // URL to web api constructor(private http: Http) { } getHeroe...