Skip to content

Instantly share code, notes, and snippets.

@eculver
Created February 3, 2014 20:17
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 eculver/8791514 to your computer and use it in GitHub Desktop.
Save eculver/8791514 to your computer and use it in GitHub Desktop.
/**
* Example Module in RequireJS
define([
'common/js/models/user',
'common/js/models/event',
'myapp/js/player'
], function () {
Ember.Application.initializer(ret = {
name: 'guid',
initialize: function (container, application) {
var guid = $.cookie(COOKIE_KEY);
if (guid) {
// set the guid on the application instance
application.set(INJECTION_NAME, guid);
}
}
});
return ret;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment