2016-02-02 14:39:34 +01:00
|
|
|
// #docregion
|
2016-05-03 14:06:32 +02:00
|
|
|
import { Component, Input } from '@angular/core';
|
|
|
|
|
|
|
|
import { Hero } from './hero';
|
2016-02-02 14:39:34 +01:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'hero-child',
|
|
|
|
template: `
|
|
|
|
<h3>{{hero.name}} says:</h3>
|
|
|
|
<p>I, {{hero.name}}, am at your service, {{masterName}}.</p>
|
|
|
|
`
|
|
|
|
})
|
|
|
|
export class HeroChildComponent {
|
|
|
|
@Input() hero: Hero;
|
|
|
|
@Input('master') masterName: string;
|
|
|
|
}
|
|
|
|
// #enddocregion
|