mirror of
https://github.com/exane/not-gwent-online
synced 2024-11-27 03:46:54 +00:00
26 lines
418 B
JavaScript
26 lines
418 B
JavaScript
var routes = {
|
|
'/lobby': function() {
|
|
alert('lobby');
|
|
},
|
|
|
|
'/deck-builder': function() {
|
|
alert('deck-builder');
|
|
},
|
|
|
|
'/highscore': function() {
|
|
alert('highscore');
|
|
}
|
|
};
|
|
|
|
var options = {
|
|
html5history: true
|
|
}
|
|
|
|
var Router = require('director').Router;
|
|
var router = new Router(routes).configure(options).init();
|
|
|
|
module.exports = {
|
|
changeRoute: function(route) {
|
|
router.setRoute(route);
|
|
}
|
|
} |