Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ember: How to execute a promise after this.send()

Tags:

ember.js

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.

like image 905
user2562424 Avatar asked Jan 21 '14 21:01

user2562424


1 Answers

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?

like image 56
Kingpin2k Avatar answered Sep 22 '22 10:09

Kingpin2k