Skip to content

Instantly share code, notes, and snippets.

@alexdiliberto
Created October 7, 2015 22:11
Show Gist options
  • Save alexdiliberto/d0751a66f17ea8491c0d to your computer and use it in GitHub Desktop.
Save alexdiliberto/d0751a66f17ea8491c0d to your computer and use it in GitHub Desktop.
Include _setup and _teardown methods on your initial component
export default Ember.Component.extend({
_setup: Ember.on('init', function() {
//do stuff in this method
}),
_teardown: Ember.on('willDestroyElement', function() {
//if you need a spot to tear down ...
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment