Skip to content

Instantly share code, notes, and snippets.

<button local-class="run" type="button" {{on "click" (perform @count)}}>Run the global countToTenTask via a local task</button>
<button local-class="run" type="button" {{on "click" (perform this.countToTenTask)}}>Run the global countToTenTask via a local task</button>
<button local-class="run" type="button" {{on "click" (perform this.countToTenTask)}}>Run the global countToTenAction via a local task</button>
<div>{{this.counter}}</div>
<button local-class="run" type="button" {{on "click" (perform this.countToTenTask)}}>Run the local countToTenTask via the perform helper</button>
<div>{{this.counter}}</div>
<button local-class="run" type="button" {{on "click" this.countToTenAction}}>Run the local action</button>
<p>{{this.counter}}</p>
<button {{on "click" this.doStuff}}>click me</button>
<p>{{this.counter}}</p>
<button {{on "click" this.doStuff}}>click me</button>