@Verthon wrote:
Hello I have a problem with same routes
/activities:name
that for example/activities/supplies
is used for POST or PUT method based on params providedisEditModeOn
. However it works only when I’m navigating to the route for the first time.When I navigate to the route multiple times it just output old outdated data from previous params.
Do I really need to create different pages like plain
activities:name
andactivities:name-edit
?
Thank you for any suggestionFunction where I navigate to the page:
let navigationExtras: NavigationExtras = { state: { date: this.reportDate, href: this.getCurrentUrlWithoutTabs(this.router.url), report: data, editMode: true, reportData: report, previewMode: preview }, replaceUrl: true, skipLocationChange: true }; let backHref = 'daily-overview' this.router.navigateByUrl(`/tabs/activities/${pageUrl}`, navigationExtras) .then(() => this.router.navigate([`/tabs/activities/${pageUrl}`]))
App routing module
{ path: 'activities/:name', loadChildren: () => import('./pages/activities/activities-routing.module').then(m => m.ActivitiesRoutingModule) }
Posts: 1
Participants: 1