// #docregion import {Component, Input} from 'angular2/core'; @Component({ selector: 'my-child', template: `
-- child view begins --
{{hero}} is my hero.
-- child view ends --
`, styles: [ '.child {background: Yellow; padding: 8px; }', '.my-child {background: LightYellow; padding: 8px; margin-top: 8px}' ] }) export class ChildComponent { @Input() hero: string; }