angular-cn/public/docs/_examples/hierarchical-dependency-inj.../ts/app/hero-card.component.ts

17 lines
299 B
TypeScript
Raw Normal View History

// #docregion
2016-04-27 14:28:22 -04:00
import {Component, Input} from '@angular/core';
import {Hero} from './hero';
@Component({
selector: 'hero-card',
template: `
<div>
<span>Name:</span>
<span>{{hero.name}}</span>
</div>`
})
export class HeroCardComponent {
@Input() hero: Hero;
}
// #docregion