I've run into an issue that I can't seem to resolve.
It should be possible to remove the preceding hashtag in routes by executing the steps provided in RouterConfiguration -> Options-> Push State
.
I've executed all these steps, see the code below.
app.ts RouterConfiguration options
public configureRouter(config: RouterConfiguration, router: Router) {
config.options.pushState = true;
config.options.root = '/';
config.map([
{
route: 'login',
name: 'login',
moduleId: 'pages/auth/login',
nav: false,
title: 'Login',
settings: {
allow_anonymous: true
}
}
]);
...
index.html head
<head>
<meta charset="utf-8">
<base href="/">
...
config.js
System.config({
baseURL: "/",
...
My login route still only works using localhost:9000/#/login
whereas localhost:9000/login
can't be found.
I've also tried implementing this in a fresh Aurelia JSPM skeleton application to no avail...
Any idea why this is happening and what I might be doing wrong?