2016-08-09 11:48:07 -07:00

25 lines
528 B
TypeScript

import { Component, HostBinding } from '@angular/core';
import { Hero } from './hero';
// #docregion
@Component({
selector: 'hero-app',
template: `
<h1>Tour of Heroes</h1>
<hero-app-main [hero]=hero></hero-app-main>`,
styles: ['h1 { font-weight: normal; }']
})
export class HeroAppComponent {
// #enddocregion
hero = new Hero(
'Human Torch',
['Mister Fantastic', 'Invisible Woman', 'Thing']
);
@HostBinding('class') get themeClass() {
return 'theme-light';
}
// #docregion
}
// #enddocregion