docs(aio): upgrade to v5 and cli 1.5

PR Close #20077
This commit is contained in:
Jesus Rodriguez
2017-11-01 21:18:03 +01:00
committed by Matias Niemelä
parent e1fb65cac4
commit a363be6b5c
11 changed files with 516 additions and 184 deletions

View File

@ -20,12 +20,12 @@ export class HeroService {
getHero(id: number) {
return this.http.get(`api/heroes/${id}`)
.map(response => response.json().data as Hero);
.map(response => response.json() as Hero);
}
getHeroes() {
return this.http.get(`api/heroes`)
.map(response => response.json().data as Hero[]);
.map(response => response.json() as Hero[]);
}
}

View File

@ -11,7 +11,7 @@ export class HeroService {
getHeroes() {
return this.http.get('api/heroes')
.map((response: Response) => <Hero[]>response.json().data);
.map((response: Response) => <Hero[]>response.json());
}
}
// #enddocregion example