Skip to content

Instantly share code, notes, and snippets.

@imjacobclark
Created June 2, 2013 21:05
Show Gist options
  • Save imjacobclark/5694984 to your computer and use it in GitHub Desktop.
Save imjacobclark/5694984 to your computer and use it in GitHub Desktop.
var Router = Backbone.Router.extend({
routes: {
"" : "main",
"about" : "about"
},
main: function() {
Session.set('page', 'main');
this.navigate('');
},
about: function(){
Session.set('page', 'about');
this.navigate('/about');
}
});
var app = new Router;
Meteor.startup(function () {
Backbone.history.start({pushState: true});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment