From a1d436e6a4ec65ad1cfc5227f83111466fffb2bf Mon Sep 17 00:00:00 2001 From: Kapunahele Wong Date: Fri, 21 Jun 2019 16:37:14 -0400 Subject: [PATCH] docs: fix formatting (#31120) PR Close #31120 --- .../examples/http/src/app/heroes/heroes.component.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/aio/content/examples/http/src/app/heroes/heroes.component.ts b/aio/content/examples/http/src/app/heroes/heroes.component.ts index 745f2b56ab..7b7547aec8 100644 --- a/aio/content/examples/http/src/app/heroes/heroes.component.ts +++ b/aio/content/examples/http/src/app/heroes/heroes.component.ts @@ -20,7 +20,8 @@ export class HeroesComponent implements OnInit { } getHeroes(): void { - this.heroesService.getHeroes().subscribe(heroes => (this.heroes = heroes)); + this.heroesService.getHeroes() + .subscribe(heroes => (this.heroes = heroes)); } add(name: string): void { @@ -42,7 +43,9 @@ export class HeroesComponent implements OnInit { delete(hero: Hero): void { this.heroes = this.heroes.filter(h => h !== hero); // #docregion delete-hero-subscribe - this.heroesService.deleteHero(hero.id).subscribe(); + this.heroesService + .deleteHero(hero.id) + .subscribe(); // #enddocregion delete-hero-subscribe /* // #docregion delete-hero-no-subscribe @@ -67,7 +70,9 @@ export class HeroesComponent implements OnInit { update() { if (this.editHero) { - this.heroesService.updateHero(this.editHero).subscribe(hero => { + this.heroesService + .updateHero(this.editHero) + .subscribe(hero => { // replace the hero in the heroes list with update from server const ix = hero ? this.heroes.findIndex(h => h.id === hero.id) : -1; if (ix > -1) {