OK, I’m trying to jump to the previous page in my nested router. I’m currently in child /1 (/app/1234567/2) and I want to go back to /app/1234567/1. My @route table is set up in the ‘app’ component with definitions for ‘1’, ‘2’, etc. The doco suggests that my code in page ‘1‘ should be:
async previousStep() {
await this.router.load("../1");
}
This gives
Uncaught (in promise) UnknownRouteError: AUR3401: Neither the route '../1' matched any configured route at 'root' nor a fallback is configured for the viewport 'default' - did you forget to add '..1' to the routes list of the route decorator of 'root'?
So that suggests it’s looking at the root level router, not the one defined in my app component (/app). Very confusing!
load="../1" in the HTML works. Why does the programmatic router method not?
Do I have to resolve differently? Is this not correct? constructor(private ninja:NinjaApp, private router: IRouter = resolve(IRouter)) { }