angular-cn/public/docs/_examples/testing/ts/app/dashboard/dashboard-hero.component.ts
Ward Bell 07cfce795f docs(testing): testing chapter and samples for RC6 (#2198)
[WIP] docs(testing): new chapter, new samples
2016-09-13 14:39:39 -07:00

18 lines
501 B
TypeScript

// #docregion
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { Hero } from '../model';
// #docregion component
@Component({
selector: 'dashboard-hero',
templateUrl: 'app/dashboard/dashboard-hero.component.html',
styleUrls: ['app/dashboard/dashboard-hero.component.css']
})
export class DashboardHeroComponent {
@Input() hero: Hero;
@Output() selected = new EventEmitter<Hero>();
click() { this.selected.next(this.hero); }
}
// #enddocregion component