Want to run action in Ember Controller afterRender? You can use the below example to run action in Ember Controller afterRender.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | App.Controller = Ember.Controller.extend({ init: function () { this._super(); Ember.run.schedule("afterRender",this,function() { this.send("foo"); }); }, actions: { foo: function() { console.log("foo"); } } }); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.