Last active
December 13, 2015 22:18
-
-
Save dbouwman/4982959 to your computer and use it in GitHub Desktop.
Simple Marionette Application with a global event debugger
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
/*global gmm */ | |
if (!this.gmm || typeof this.gmm !== 'object') { | |
this.gmm = {}; | |
} | |
(function () { | |
'use strict'; | |
gmm.Viewer = new Backbone.Marionette.Application(); | |
gmm.Viewer.addRegions({ | |
toolsRegion: '#tool-list-region' | |
}); | |
//debugging so we can see events flying around | |
gmm.Viewer.vent.on('all', function (evt, model) { | |
console.log('gmm.Viewer DEBUG: Event Caught: ' + evt); | |
if (model) { | |
console.dir(model); | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment