lundi 26 octobre 2015

How to propagate changes from actions to template instantaneously Ember

My ember action is taking a lot of time and I am trying to show user something while the control is inside the action,

My ember controller is :

.. = {
    isLoading : false,
    actions : {
        create : {
            this.set('isLoading', true);
            // do some stuff...
            this.set('isLoading', false);
        },
    },
}

And the template is

the value of isLoading is {{isLoading}}
<div {{action "create"}} >Go!</div>

But when I click on Go, the value of isLoading does not change.




Aucun commentaire:

Enregistrer un commentaire