vendredi 8 novembre 2019

How to create promise based action (instead of sendAction) in ember?

I have a use case where the action should get the value from another component, based on that I need to do some actions. Initially, I used sendAction (instead of promiseAction()) to do some actions. But closeDataModal() runs immediately after finishing the sendAction. I want the first function to finish up and then run the second one.

saveAction() {
  promiseAction()
  closeDataModal() -> Run after resolving the promiseAction
}



Aucun commentaire:

Enregistrer un commentaire