Templates not being displayed in <router-view>

I’m new to Aurelia and I’m trying to get a handle on using the router. When I add a router-view element to my app.html-template it will not render any HTML-content from the template, just the index.html-page (parent with headers and an empty body). There are no errors in the browser’s console, and I can see that both files for the specific route has been loaded (home.html and home.js)

If I remove the router-view element, the HTML-content from app.html will render correctly, but obviously none of the templates/components defined in the routes. My configureRouter looks like this:

configureRouter(config, router) {
this.router = router;
config.title = ‘RouterTest’;
{ route: [’’, ‘home’], name: ‘home’, moduleId: ‘./home’, title: ‘Home’ },
{ route: ‘orders’, name: ‘orders’, moduleId: ‘./orders’, title: ‘Orders’},

What am I missing?
I would appreciate any help I can get on this issue as I’ve been stuck here for a while :slight_smile:

What tutorial did you follow to create that app? It seems you are using a very outdated jspm/systemjs setup.

Pls try to use latest aurelia-cli to create an app either using webpack or CLI bundler.

npm i -g aurelia-cli


au new

I can’t remember to be honest. I created the app about 15 months ago and picked it up again yesterday. I think I followed some tutorial (TODO-app) on YouTube as well as reading the documentation. So when I picked it up again yesterday, I just tried to continue where I left off and tried to add routing.

I’ll try to create a new app from scratch to see if I can get it working .


if you are using webpack… you should use

moduleId: PLATFORM.moduleName("./home"),

and don’t forget to import PLATFORM.