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

上一篇: Knockout Observable数组与排序和Foreach数据

下一篇: Ember:如何在this.send()之后执行承诺