Skip to content

Instantly share code, notes, and snippets.

@wecc
Created April 27, 2016 17:27
Show Gist options
  • Save wecc/1caf6cd570c70a2e2139f12231de68a1 to your computer and use it in GitHub Desktop.
Save wecc/1caf6cd570c70a2e2139f12231de68a1 to your computer and use it in GitHub Desktop.
import Ember from 'ember';
import { task } from 'ember-concurrency';
export default Ember.Controller.extend({
parentTask: task(function* () {
yield this.get('childTask').perform();
}),
childTask: task(function* () {
throw new Error('childTask error');
}),
});
<button {{action (perform parentTask)}}>parentTask</button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment