Reload child routing

Hey, I have a problem with child routing. I would like, for example, when I’m on step 2 or 3 when refreshing the page, go to step 1.

Please, help :slight_smile:

configureRouter(config: RouterConfiguration, router: Router) {
config.title = “Web”;[
route: [’’, ‘test1’],
name: “test1”,
moduleId: PLATFORM.moduleName("…/modules/steps/test1"),
nav: true,
title: “Test 1”,
route: ‘test2’,
name: “test2”,
moduleId: PLATFORM.moduleName("…/modules/steps/test2"),
nav: true,
title: “Test 2”,
href: “#/modules/test2”,
route: 'test3,
name: “test3”,
moduleId: PLATFORM.moduleName("…/modules/steps/test3"),
nav: true,
title: “Test 3”,
href: “#/modules/test3”,
this.router = router;

1 Like

I don’t think this is a router problem, or even the problem you describe exists because your steps have routes.

I would either remove the routes and implement code that loads a specific view depending on the step you are currently at (keeping this in memory not persistent storage) or redirect to step 1 if certain data does not exist or check document.referrer to see if the previous page was actually a previous step (or get the info from the router). Multiple ways how you could tackle this.

Hope this helps solve your problem.