Skip to content

Instantly share code, notes, and snippets.

@tphdev
Last active November 11, 2016 19:04
Show Gist options
  • Save tphdev/9b4e0c5641e80b4e51928c718ac56c3d to your computer and use it in GitHub Desktop.
Save tphdev/9b4e0c5641e80b4e51928c718ac56c3d to your computer and use it in GitHub Desktop.
Basic Backbone Router
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