mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
23 lines
541 B
TypeScript
23 lines
541 B
TypeScript
// #docplaster
|
|
// #docregion
|
|
import { Component } from '@angular/core';
|
|
import { Hero, HEROES } from './hero';
|
|
|
|
@Component({
|
|
selector: 'app-root',
|
|
templateUrl: './app.component.html',
|
|
styleUrls: ['./app.component.css']
|
|
})
|
|
// #docregion class, class-skeleton
|
|
export class AppComponent {
|
|
// #enddocregion class-skeleton
|
|
title = 'Authors Style Guide Sample';
|
|
heroes = HEROES;
|
|
selectedHero: Hero;
|
|
|
|
onSelect(hero: Hero): void {
|
|
this.selectedHero = hero;
|
|
}
|
|
// #docregion class-skeleton
|
|
}
|
|
// #enddocregion class, class-skeleton
|