1
0
mirror of https://github.com/exane/not-gwent-online synced 2024-10-31 10:36:53 +00:00
not-gwent-online/site/client/app/routes.js

26 lines
418 B
JavaScript
Raw Normal View History

2015-06-21 19:20:17 +00:00
var routes = {
'/lobby': function() {
alert('lobby');
},
2015-06-21 11:09:29 +00:00
2015-06-21 19:20:17 +00:00
'/deck-builder': function() {
alert('deck-builder');
},
2015-06-21 11:09:29 +00:00
2015-06-21 19:20:17 +00:00
'/highscore': function() {
alert('highscore');
}
};
2015-06-21 11:09:29 +00:00
2015-06-21 19:20:17 +00:00
var options = {
html5history: true
2015-06-21 19:20:17 +00:00
}
2015-06-21 15:14:53 +00:00
2015-06-21 19:20:17 +00:00
var Router = require('director').Router;
var router = new Router(routes).configure(options).init();
2015-06-21 11:09:29 +00:00
2015-06-21 19:20:17 +00:00
module.exports = {
changeRoute: function(route) {
router.setRoute(route);
2015-06-21 11:09:29 +00:00
}
}