Created
November 13, 2013 16:50
-
-
Save blocka/7452341 to your computer and use it in GitHub Desktop.
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
var i = 0; | |
var router = new (Backbone.Router.extend({ | |
before: { | |
'someotherroute': function() { | |
}, | |
'': function(fragment,args,next) { | |
setTimeout(function() { | |
alert('Called me ' + i++ + ' times'); | |
next(); | |
},1000) | |
} | |
} | |
}))(); | |
router.route('',function() { | |
}) | |
Backbone.history.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment