Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (10 sloc) 424 Bytes
<input #candidateName type="text" placeholder="Coffee name">
<button (click)="store.addCandidate(candidateName.value); candidateName.value = ''">Add candidate</button>
<h2>Coffee candidates</h2>
<ul>
<li *ngFor="let candidate of (store.state$ | async).candidates">
<span>{{ candidate.name }}</span>
<span>Votes: {{ candidate.votes }}</span>
<button (click)="store.addVote(candidate)">+</button>
</li>
</ul>