I have a simple Angular app which uses the router.
My routing logic is simple
Routes = [
{ path: '', component: MyMainComponent },
{ path: 'error', component: ErrorComponent },
]
If an error occurs in the app, the logic navigates to the ErrorComponent and therefore what I see on the browser url is http://localhost:4200/error.
If the user reloads the app from here (e.g. with CMD+R) the app goes back to the Error page. Is there a way to force a reload to go to the Main even if we reload a url pointing to an existing route path?