2 ms·
you can do the same in aurelia: counter.html: <template> <div>${count}</div> <input type="text" value.bind="count" /> <button click.dele
by em-bee 3y ago
you can do the same in aurelia:
counter.html:
<template>
<div>${count}</div>
<input type="text" value.bind="count" />
<button click.delegate="inc()">add one</button>
<button click.delegate="counter--">subtract one</button>
</template>
counter.js:
export class Counter {
constructor() {
this.counter = 0
}
inc() {
this.counter++
}
}