Created
May 14, 2013 16:57
-
-
Save vsavkin/5577557 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var App = new Marionette.Application(); | |
//This object is responsible for storing user data. | |
var userInfo = { | |
favouriteLanguages: function(user){ | |
return ["JS", "Ruby"]; | |
} | |
}; | |
//This module is responsible for displaying user data. | |
var userProfile = App.module("userProfile"); | |
userProfile.addInitializer(function(opts){ | |
var languages = opts.userInfo.favouriteLanguages("Victor"); | |
displayLanguages(languages); | |
}); | |
//Here we initialize all the modules of the application. | |
userProfile.start({userInfo: userInfo}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment