Simplify name-child component. Update TS version in package.json and the web systemjs.configs Inspired by issue #2881
19 lines
363 B
TypeScript
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
|