Ward Bell efcb906981 chore(cb-component-communication): tweak code/update TS version ()
Simplify name-child component.
Update TS version in package.json and the web systemjs.configs
Inspired by issue 
2016-11-29 15:39:53 -08:00

19 lines
363 B
TypeScript

// #docregion
import { Component, Input } from '@angular/core';
@Component({
selector: 'name-child',
template: '<h3>"{{name}}"</h3>'
})
export class NameChildComponent {
private _name = '';
@Input()
set name(name: string) {
this._name = (name && name.trim()) || '<no name set>';
}
get name(): string { return this._name; }
}
// #enddocregion