Created
June 24, 2012 14:36
-
-
Save alexandernst/2983461 to your computer and use it in GitHub Desktop.
Backbone Error 404
This file contains hidden or 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
window.APP = Backbone.Router.extend({ | |
initialize: function(){ | |
this.route(/.*?/, "e404"); | |
this.route(/^$/, 'mainPage'); | |
//Some other routes | |
}, | |
e404: function(){ | |
console.log("Error 404!"); | |
}, | |
mainPage: function(){ | |
console.log("Main page!"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment