You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
actions: {// callback required for async buttonregister(callback){this.get('pathStore').storeCurrentRoute();letpromise=this.get('model').save().then(user=>{this.sendAction('successAction');user.unloadRecord();});callback(promise);},},
and now my async-button correctly stops being in the pending state upon promise return (presumably -- it's still unclear why there needs to be a callback with a promised passed - esp since this is an anti-pattern in ember).
The text was updated successfully, but these errors were encountered:
I was trying so many different combinations of making promises and returning them in the action...
I discovered in the demo, a callback is used.
http://jsbin.com/qokogasilu/1/edit?html,css,js,output
so, in my code, I now have this:
and now my async-button correctly stops being in the pending state upon promise return (presumably -- it's still unclear why there needs to be a callback with a promised passed - esp since this is an anti-pattern in ember).
The text was updated successfully, but these errors were encountered: