Skip to content

Instantly share code, notes, and snippets.

@James1x0
Created July 24, 2014 17:03
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 James1x0/83b709e8c6f458b280a4 to your computer and use it in GitHub Desktop.
Save James1x0/83b709e8c6f458b280a4 to your computer and use it in GitHub Desktop.
Session Initializer
export default {
name: 'session',
after: 'store',
initialize: function (container, app) {
app.deferReadiness();
var store = container.lookup('store:main');
store.find('session', { active: true }).then(function (ses) {
container.lookup('controller:session').set('content', ses);
container.typeInjection('controller', 'session', 'controller:session');
app.advanceReadiness();
});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment