Last active
July 2, 2018 11:25
-
-
Save realtomaszkula/75b973ac1bbfdd45d92be6b8735a780a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component({ | |
selector: 'app-welcome', | |
template: ` | |
<div *ngFor="let name of names"> | |
Welcome {{ name }}! | |
</div> | |
` | |
}) | |
export class WelcomeComponent { | |
private _names: string[]; | |
get names(): string[] { | |
return this._names; | |
} | |
@Input() | |
set names(value: string[]) { | |
this._names = coerceArray(value); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment