Add the click event handler Add a details section
This commit is contained in:
parent
f39771a252
commit
3c39ab3cc2
|
@ -13,4 +13,12 @@ import {HEROES} from '../mock-heroes';
|
|||
|
||||
export class HeroesComponent { //определяем класс со списком героев
|
||||
heroes = HEROES;
|
||||
}
|
||||
selectedHero?: Hero;
|
||||
|
||||
onSelect(hero: Hero): void {
|
||||
this.selectedHero = hero;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue