Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Empty Module and Controller
/*global gmm */
if (!this.gmm || typeof this.gmm !== 'object') {
this.gmm = {};
}
(function () {
'use strict';
gmm.Viewer.module('NavbarModule', function (Mod, Viewer, Backbone, Marionette, $, _) {
//==================================
//initializer called on Viewer.start(options)
//==================================
Mod.addInitializer(function (options) {
Mod.controller = new Controller({
toolItems: options.toolItems,
//we pass in the region from the app because it will be
//converted into a Marionette.Region for us
region: Viewer.toolsRegion
});
});
//==================================
//Controller for the NavbarModule
//==================================
var Controller = Backbone.Marionette.Controller.extend({
initialize: function (options) {
_.bindAll();
this.region = options.region;
});
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.