Skip to content

Instantly share code, notes, and snippets.

@allthesignals
Created January 1, 2018 22:45
Show Gist options
  • Select an option

  • Save allthesignals/050d838cf13a07db17cf63be69e3daeb to your computer and use it in GitHub Desktop.

Select an option

Save allthesignals/050d838cf13a07db17cf63be69e3daeb to your computer and use it in GitHub Desktop.
export default Ember.Route.extend({
//...
afterModel({ taskInstance }) {
this.get('setSelectedTask').perform(taskInstance);
},
setSelectedTask: task(function* (taskInstance) {
const model = yield taskInstance;
this.set('mainMap.selected', model);
}).restartable().cancelOn('deactivate'),
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment