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’;
config.map([
{ 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