Routing problems

Hi

I’m trying to configure Routing in my project like this:
I have app.ts:
import “bootstrap”;
import { PLATFORM } from “aurelia-pal”;
import { RouterConfiguration, Router } from “aurelia-router”;

export class App {
constructor() {}

configureRouter(config: RouterConfiguration, router: Router) {
config.title = “Planificador”;

config.map([
  {
    route: ["", "list"],
    name: "list",
    moduleId: PLATFORM.moduleName("./Projects/views/list")
  },
  {
    route: "edit/:id",
    name: "edit",
    moduleId: PLATFORM.moduleName("./Projects/views/edit")
  }
]);

}
}

But the route: localhost:5000/edit/P0000001 shows an 404 error

I have en the correct path the edit.ts an the edit.html
edit.ts
export class Edit {}
edit.html

Planificador guapo

Any idea please?

regards

Try localhost:5000/#edit/P000001

1 Like