src/app/hero-detail/hero-detail.component.ts
Component for the management of details of the Heroes.
selector | app-hero-detail |
styleUrls | ./hero-detail.component.css |
templateUrl | ./hero-detail.component.html |
Methods |
Inputs |
constructor(route: ActivatedRoute, heroService: HeroService, location: Location)
|
||||||||||||
Parameters :
|
hero
|
Hero selected
Type : |
getHero |
getHero()
|
Loads specific Hero based on URL id
Returns :
void
|
goBack |
goBack()
|
Go back last web page
Returns :
void
|
ngOnInit |
ngOnInit()
|
When webpage is loaded, gets hero id from the URL
Returns :
void
|
save |
save()
|
Uploads specific Hero data based on URL id
Returns :
void
|
./hero-detail.component.css