Issue
I did a migration from Angular 10 to 13 and Ionic 5 to 6.
With my current set-up (Angular 13, Ionic 6), I have a strange behavior: when I navigate to new page using routerLink directive, the new page reload and the page stack is lose.
The behavior is the same as user typing directly the URL in navigator bar.
I tried to find similar issue or way to understand this behavior but nothing.
Can you help me please ?
Router Root configuration:
RouterModule.forRoot(routes, {
preloadingStrategy: PreloadAllModules,
anchorScrolling: 'enabled',
enableTracing: false,
relativeLinkResolution: 'legacy'
})
Link button integration:
<ion-button [routerLink]="['/dashboard/targets']" [queryParams]="{s: 'community'}" ...>...</ion-button>
Router Child configuration:
RouterModule.forChild([
{
path: 'targets',
loadChildren: () => import('./targets/targets.module').then( m => m.DashboardTargetsPageModule)
}
]),
Solution
There is a bug in Ionic 6, it was resolved in Ionic 6.0.16, try install that version.
npm install @ionic/angular@6.0.16
Answered By - Talon
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.