Skip to content

Instantly share code, notes, and snippets.

@hauntedhost
Created September 9, 2014 22:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hauntedhost/8e83da49932730a8f14d to your computer and use it in GitHub Desktop.
Save hauntedhost/8e83da49932730a8f14d to your computer and use it in GitHub Desktop.
Ember.js HookupContainer mixin
// mixins/hookup_container.js
App.HookupContainer = Ember.Mixin.create({
// https://github.com/tehviking/giffindor/issues/1#issuecomment-51066764
hookupContainer: function() {
this.container = SoftLacrosse.__container__;
}.on('init'),
});
// components/my_component.js
App.MyComponent = Ember.Component.extend(
App.HookupContainer, {
layoutName: 'components/my-component',
...
...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment