Skip to content

Instantly share code, notes, and snippets.

@thadk
Last active December 30, 2015 10:39
Show Gist options
  • Save thadk/7817305 to your computer and use it in GitHub Desktop.
Save thadk/7817305 to your computer and use it in GitHub Desktop.
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