Skip to content

Instantly share code, notes, and snippets.

@WebCloud
Last active August 29, 2015 13:58
Show Gist options
  • Save WebCloud/10275078 to your computer and use it in GitHub Desktop.
Save WebCloud/10275078 to your computer and use it in GitHub Desktop.
// http://emberjs.com/api/classes/Ember._MetamorphView.html#event_didInsertElement workaround for the
/*
didInsertElement: function(){
console.log('only called on the first load of the view');
}
*/
// either Ember.View.reopen (beware, will execute on EVERY view) or App.MyView = Ember.View.create
init:function(){
this._super();
this.on('didInsertElement', function(){
console.log('now I\'m called every time!');
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment