angular-cn/public/docs/_examples/component-styles/ts/app/hero-details.component.ts
Patrice Chalin ef66e38e54 docs(dev guide): Update 'Component Styles' prose (#1320)
Reowork Ts prose and add Dart prose/code

+ Updates to docs and example code

(Starting point for Dart code was taken from #1171.)
2016-05-10 08:51:23 +01:00

21 lines
524 B
TypeScript

import { Component, Input } from '@angular/core';
import { Hero } from './hero';
import { HeroTeamComponent } from './hero-team.component';
// #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 {
// #enddocregion styleurls
@Input() hero: Hero;
// #docregion styleurls
}