20 lines
415 B
TypeScript
20 lines
415 B
TypeScript
|
import {Component, Input} from 'angular2/core';
|
||
|
import {Hero} from './hero';
|
||
|
|
||
|
// #docregion stylelink
|
||
|
@Component({
|
||
|
selector: 'hero-team',
|
||
|
template: `
|
||
|
<link rel="stylesheet" href="app/hero-team.component.css">
|
||
|
<h3>Team</h3>
|
||
|
<ul>
|
||
|
<li *ngFor="#member of hero.team">
|
||
|
{{member}}
|
||
|
</li>
|
||
|
</ul>`
|
||
|
})
|
||
|
// #enddocregion stylelink
|
||
|
export class HeroTeamComponent {
|
||
|
@Input() hero: Hero;
|
||
|
}
|