samedi 17 novembre 2018

Ember Disable button while an action is completing its process

template


<button  type="submit">Add</button>

controller

export default Controller.extend({
    actions: {
        addUser: function(){
            //some codes here
            $.ajax({
                //some codes here
            }).then(()=>{
                alert("success");
            });
        }
    }
});

When I call press the button and call the function addUser I need to disable the button until the whole function is finished execution

Please help..!




Aucun commentaire:

Enregistrer un commentaire