Skip to content

Instantly share code, notes, and snippets.

@fernandofleury
Created October 4, 2013 13:44
Show Gist options
  • Save fernandofleury/6826148 to your computer and use it in GitHub Desktop.
Save fernandofleury/6826148 to your computer and use it in GitHub Desktop.
// home.js
(function(){
'use strict';
var HomeView = Backbone.View.Extend();
var homeView = new HomeView();
})();
// router.js
var app = app || {};
require([view/home], function(){
'use strict';
var Router = Backbone.Router.extend({
routes: {
"": "home"
}
});
app.router = new Router();
router.on('router:home', function(){
homeView.render();
});
Backbone.history.start();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment