Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import { Component, OnInit } from '@angular/core';
selector: 'app-root',
template: `
<app-message [person]='p'></app-message>
<button (click)='changeName()'>Change Name</button>
export class AppComponent implements OnInit {
p: any;
ngOnInit(): void {
this.p = {
firstname: 'Brad',
lastname: 'Cooper'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment