I tried to follow some tutorials on aurelia.io routing like this one http://www.tutorialspoint.com/aurelia/index.htm
I implemented a configureRouter method in my App class but it s never called
app.js
export class App {
constructor()
{
console.log("app");
}
configureRouter(config, router){
console.log("configureRouter");
config.title = 'Aurelia';
config.map([
{ route: ['','home'], name: 'home',
moduleId: './components/home/home', nav: true, title:'Home' },
{ route: 'about', name: 'about',
moduleId: './components/about/about', nav: true, title:'About' }
]);
this.router = router;
}
}
app.html
<template>
<nav>
<ul>
<li repeat.for = "row of router.navigation">
<a href.bind = "row.href">${row.title}</a>
</li>
</ul>
</nav>
<router-view></router-view>
</template>
As far as I understand, the configureRouter method in app.js is supposed to be called automatically when router-view is detected in the template, but it s not the case (and I dont get any errors in chrome console)
Any ideas?