Question: Is there way to use EC tasks lifecycle events within EC decorators?
Closed this issue · 3 comments
KalachevDev commented
The title actually describes my issue pretty well, what is the valid syntax for using modifiers?
Like:
someTask: task(function * () {
yield stuff();
}).on('didInsertElement')
buschtoens commented
Can you try this?
class {
@task({ on: 'didInsertElement' })
*someTask() {
// ...
}
}
KalachevDev commented
@buschtoens it works, thank you! It might be good to declare it in docs somehow, or did I miss something and it is already there? :)
buschtoens commented
Yes, you're right. It's not explicitly documented. In fact all modifiers "just work" even third-party ones, like ember-concurrency-test-waiter
.