Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import { Component, Input } from '@angular/core';
selector: 'name-child',
template: `
export class NameChildComponent {
_name: string = '<no name set>';
set name(name: string) {
this._name = (name && name.trim()) || '<no name set>';
get name() { return this._name; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment