Last active
November 11, 2016 19:04
-
-
Save tphdev/9b4e0c5641e80b4e51928c718ac56c3d to your computer and use it in GitHub Desktop.
Basic Backbone Router
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
const Backbone = require('backbone') | |
// const AppViewController = require('backbone') | |
const AppRouter = Backbone.Router.extend({ | |
routes: { | |
"*" : "renderCatchAll" | |
}, | |
renderCatchAll: function(){ | |
document.querySelector('#app-container').innerHTML = "<h1>YOLO</h1>" | |
// ReactDOM.render(<AppViewController routedFrom="HomeView"/>, document.querySelector('#app-container")) | |
}, | |
initialize: function(){ | |
} | |
}) | |
let app = new AppRouter() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment