22 lines
419 B
JavaScript
22 lines
419 B
JavaScript
|
// -----------------------------------------------
|
||
|
// Routing
|
||
|
// -----------------------------------------------
|
||
|
|
||
|
// [ set hash base ] -----------------------------
|
||
|
|
||
|
route.base('#');
|
||
|
|
||
|
// [ define routes ] -----------------------------
|
||
|
|
||
|
// home page
|
||
|
route('/', function () {
|
||
|
riot.mount('#view', 'home');
|
||
|
});
|
||
|
|
||
|
// about page
|
||
|
route('/about', function () {
|
||
|
riot.mount('#view', 'about');
|
||
|
});
|
||
|
|
||
|
module.exports = route;
|