mardi 16 juin 2015

Execute functions inside actions hook in emberjs from global scope

im new to ember framework. I just want to execute a function that defined inside the actions hook when the rendering completes.

var Controller = Ember.Controller.extend({
  actions: {
    foo: function() {
        console.log("foo");
    }
  }
});
Ember.run.schedule("afterRender",this,function() {
  this.send("foo");
}

but the above code not working..

Aucun commentaire:

Enregistrer un commentaire