Skip to content

Instantly share code, notes, and snippets.

@ChanderG
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChanderG/76fad8c17d58dd250e94 to your computer and use it in GitHub Desktop.
Save ChanderG/76fad8c17d58dd250e94 to your computer and use it in GitHub Desktop.
Injecting store into views (say) in EmberJS applications using EAK
//this file goes into app/initializers/
//same logic for injecting into other stuff
//tested
export default {
name: "injectStoreIntoView",
after: "store",
initialize: function(container, application) {
container.typeInjection('view', 'store', 'store:main');
}
};
//another solution use this:
//this.get('controller').get('store').find('<whatever>')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment