This is the initial page index.marko
<init-app/>
<!doctype html>
<html>
<head>
<title>Marko + Huncwot Example</title>
<include-stylesheets/>
</head>
<body>
<main/>
<include-javascripts />
</body>
</html>This is the the root component at componenents/main/index.marko
import { Router } from 'marko-path-router';
import axios from 'axios';
class {
onMount() {
const routes = [
{ path: '/', component: require('../home') },
{ path: '/click-count', component: require('../click-count') },
]
const render = Router.renderSync({
routes,
initialRoute: '/'
})
render
.appendTo(this.getEl('router-container'))
.getComponent()
}
}