ember.js - How to call ember actions synchronously -


i want execute couple of ember actions synchronously, right way this. example

this.send('closemodal'); this.send('openmodal','login'); // run when `closemodal` totally executed 

or how call action in route without using send

export default ember.route.extend({ actions:{    openmodal: function () {     //how execute this.closemodal(); without .send        ... logic...     });    closemodal: function () {        ... logic...     }); } }); 

perhaps move action logic other functions on route i.e.

export default ember.route.extend({   openmodal: function() {     ...logic...   },    closemodal: function() {     ...logic...   },    actions:{     openmodal: function () {       this.closemodal(); // ensure other modals closed.       this.openmodal();     });      closemodal: function () {       this.closemodal();     });   } }); 

Comments