user2562424
user2562424

Reputation: 491

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.

Upvotes: 7

Views: 2333

Answers (1)

Kingpin2k
Kingpin2k

Reputation: 47367

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?

Upvotes: 3

Related Questions