Created
February 3, 2014 20:17
-
-
Save eculver/8791514 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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