projects
/
examples
/
angular-tour-of-heroes
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WIP: 6: Get Data from a Server k) Search by name
[examples/angular-tour-of-heroes]
/
src
/
app
/
hero-detail
/
hero-detail.component.ts
diff --git
a/src/app/hero-detail/hero-detail.component.ts
b/src/app/hero-detail/hero-detail.component.ts
index
76e7912
..
caeb796
100644
(file)
--- a/
src/app/hero-detail/hero-detail.component.ts
+++ b/
src/app/hero-detail/hero-detail.component.ts
@@
-37,6
+37,11
@@
export class HeroDetailComponent implements OnInit {
});
}
});
}
+ save(): void {
+ this.heroService.updateHero(this.hero)
+ .subscribe(() => this.goBack());
+ }
+
goBack(): void {
this.location.back();
}
goBack(): void {
this.location.back();
}