Last active
December 30, 2015 10:39
-
-
Save thadk/7817305 to your computer and use it in GitHub Desktop.
Backbone Marionette module starting from [this fork]( https://github.com/elycruz/generator-marionette ) and [this repo]( https://github.com/mrichard/generator-marionette ) and [for this comment]( https://github.com/mrichard/generator-marionette/issues/37 ) .
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
define([ | |
'backbone', | |
'application', | |
'apps/my-app-mod/layout/my-app-mod-layout', | |
'apps/my-app-mod/my-app-mod-list', | |
'apps/my-app-mod/item/message-view', | |
'apps/my-app-mod/my-app-mod' | |
], function(Backbone, app, MyAppModLayout, MyAppModListController, MessageView, AppRouter) { | |
'use strict'; | |
return app.module('myAppMod', function(mod) { | |
mod.addInitializer(function() { | |
var myAppModLayout = new MyAppModLayout(); | |
app.content.show(myAppModLayout); | |
var myAppModListController = new MyAppModListController({ | |
application: app, | |
layout: myAppModLayout | |
}); | |
app.router = new AppRouter({ | |
controller: myAppModListController}); | |
console.log('MyAppMod has been initialized.'); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment