Ember: How to execute a promise after this.send()
How do I do something like:
this.send('someFunction').then(function(response) {
// do something with the response data
});
In this case, "someFunction" is an action from a mixin.
send doesn't return anything, but you can send a defer/promise into it and expect the action to resolve it.
I'll find the example I gave a few weeks back and put it up here.
Return a promise from a controller action in Ember?
链接地址: http://www.djcxy.com/p/18718.html