Created
May 14, 2019 13:22
-
-
Save cyberpirate92/c430d8b987f148c8d8a7be9803766e41 to your computer and use it in GitHub Desktop.
This file contains 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
<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