2016-05-03 14:06:32 +02:00
|
|
|
import { Component, Input } from '@angular/core';
|
|
|
|
import { Hero } from './hero';
|
|
|
|
import { HeroTeamComponent } from './hero-team.component';
|
2016-04-05 09:27:10 +03:00
|
|
|
|
|
|
|
// #docregion styleurls
|
|
|
|
@Component({
|
|
|
|
selector: 'hero-details',
|
|
|
|
template: `
|
|
|
|
<h2>{{hero.name}}</h2>
|
|
|
|
<hero-team [hero]=hero></hero-team>
|
|
|
|
<ng-content></ng-content>
|
|
|
|
`,
|
|
|
|
styleUrls: ['app/hero-details.component.css'],
|
|
|
|
directives: [HeroTeamComponent]
|
|
|
|
})
|
|
|
|
export class HeroDetailsComponent {
|
2016-05-10 00:51:23 -07:00
|
|
|
// #enddocregion styleurls
|
|
|
|
@Input() hero: Hero;
|
|
|
|
// #docregion styleurls
|
2016-04-05 09:27:10 +03:00
|
|
|
}
|