Created
January 9, 2019 10:13
-
-
Save jasonmit/9a896176be8ec02b601816b29fd0dd4c to your computer and use it in GitHub Desktop.
ember discuss question
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { task } from 'ember-concurrency'; | |
export default Controller.extend({ | |
setup: task(function*() { | |
yield delay(6000); | |
this.set('model', { message: '1' }); | |
yield delay(4000); | |
this.set('model', { message: '2' }); | |
yield delay(2000); | |
this.set('model', { message: '3' }); | |
}) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default Route.extend({ | |
setupController(controller) { | |
this._super(...arguments); | |
controller.get('setup').perform(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment