Last active
December 11, 2015 07:18
-
-
Save jcreamer898/4565000 to your computer and use it in GitHub Desktop.
Abstract backbone's trigger method and call Monologue's emit.
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
// Push backbone's routing events to the buss. | |
var trigger = AppRouter.prototype.trigger; | |
AppRouter.prototype.trigger = function() { | |
var args = Array.prototype.slice.call( arguments, 1 ); | |
this.emit( arguments[ 0 ], args ); | |
trigger.apply( this, args ); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment