Opening subpages in tabs works - sometimes
Closed this issue · 1 comments
Describe the bug
Using version 14.0.0 with Angular 14.
Being our main page /dashboard (or here: /en/dashboard), I open sub pages in tabs. Sometimes, this works seemlessly. But more often, I get redirected to /en/dashboard again.
Avoiding to use tabs helps - all pages get loaded as expected.
Note: /en/dashboard is our error fallback, but I've checked remote requests: they were all successful.
To Reproduce
Steps to reproduce the behavior:
- Go to main page /en/dashboard
- Open another page in a tab
- Sometimes, opening the page works as expected - but often not, since the tab starts loading but then gets redirected to /en/dashboard again
Expected behavior
Should be irrelevant, if the page is loading in a tab or not.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Ubuntu 22, Windows 10
- Browser Firefox (Ubuntu), Chrome (Win)
- Version 111.0.1 (64-Bit) (Ubuntu), Chrome version unknown
Smartphone (please complete the following information):
- irrelevant
Additional context
Our app routings:
`
const routes: Routes = [
{
path: '',
redirectTo: '/dashboard',
pathMatch: 'full'
},
{
path: 'dashboard',
loadChildren: () => LandingModule
},
{
path: ':market/dashboard',
loadChildren: () => LandingModule
},
...errorRoute,
{
path: '**',
redirectTo: '/dashboard'
}
];
@NgModule({
imports: [RouterModule.forRoot(routes, {preloadingStrategy: AppCustomPreloader})],
exports: [RouterModule],
providers: [AppCustomPreloader]
})
export class AppRoutingModule {}
`
Relevant part of app.module:
@NgModule({ declarations: [AppComponent], imports: [ AppRoutingModule, HttpClientModule, L10nTranslationModule.forRoot( l10nConfig, { translationLoader: TranslationLoader } ), L10nValidationModule.forRoot(), L10nRoutingModule.forRoot() ], providers: [ StartupService, { provide: APP_INITIALIZER, useFactory: initL10n, deps: [L10nLoader], multi: true }, ], bootstrap: [AppComponent] }) export class AppModule { }
(sorry for the formatting)