Move Duck detail/editor to a separate component

Signed-off-by: Gergely Polonkai <gergely@polonkai.eu>
This commit is contained in:
2016-09-06 14:21:25 +02:00
parent f7bf483aa7
commit 06af47fccf
4 changed files with 28 additions and 11 deletions

View File

@@ -1,14 +1,5 @@
<h1>Hello!</h1>
<div *ngIf="selectedDuck">
<div>
<label>id:</label>
{{ selectedDuck.id }}
</div>
<div>
<label>color:</label>
<input [(ngModel)]="selectedDuck.color" placeholder="Color">
</div>
</div>
<duck-detail [duck]="selectedDuck"></duck-detail>
<ul>
<li *ngFor="let duck of ducks" (click)="onSelect(duck)">