Skip to content

Instantly share code, notes, and snippets.

@kobvel
Created October 27, 2017 15:33
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 kobvel/0a998982270cdb84a981cb949e140cb8 to your computer and use it in GitHub Desktop.
Save kobvel/0a998982270cdb84a981cb949e140cb8 to your computer and use it in GitHub Desktop.
<ul>
<li *ngFor="let item of items | async">
<input type="text" #updatetext [value]="item.text" />
<button (click)="updateItem(item.key, updatetext.value)">Update</button>
<button (click)="deleteItem(item.key)">Delete</button>
</li>
</ul>
<input type="text" #newitem />
<button (click)="addItem(newitem.value)">Add</button>
<button (click)="deleteEverything()">Delete All</button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment