Skip to content

Instantly share code, notes, and snippets.

@cyberpirate92
Created May 14, 2019 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cyberpirate92/c430d8b987f148c8d8a7be9803766e41 to your computer and use it in GitHub Desktop.
Save cyberpirate92/c430d8b987f148c8d8a7be9803766e41 to your computer and use it in GitHub Desktop.
<div class="container">
<h3> Parent component </h3>
Name: <input type='text' [(ngModel)]="person.name"> <br />
Age: <button (click)="person.age = person.age+1">+</button> {{ person.age }} <button (click)="person.age = person.age-1">-</button> <br />
<button (click)="reassign()">Re-Assign</button> <br>
<pre>{{ person | json}}</pre>
<child [person]="person"></child>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment