Hello All,
We have a requirement that we will send our users URL similar to below URL with /event/session-tracks/ in the URL
https://xyz.microsoftcrmportals.com/event/session-tracks?id=Event_A
But when i click this URL it is redirecting to /events/sessions/
https://xyz.microsoftcrmportals.com/event/sessions?id=Event_A
Do we need to change in the route.ts ??
{
path: "event",
component: EventComponent,
children: [
{
path: "",
redirectTo: EventDetailSections.Sessions,
pathMatch: "prefix"
},
{
path: EventDetailSections.Sessions,
component: SessionsComponent
},
{
path: EventDetailSections.SessionTracks,
component: SessiontracksComponent
},
{
path: EventDetailSections.Speakers,
component: SpeakersComponent
},
{
path: EventDetailSections.PassInformation,
component: PassesComponent
}
]
}
Kind Regards,
Abhilash.
Changes in the Route.ts and event component changeRoute() function i achieved the desired result.
Comment the Else part and add it in the if part at the end and also remove the default route withing child elements of the "/event".
public chooseRoute () {
if (!this.showSessions) {
if (this.showSessionTracks) {
console.log("Event Component.ts showSessionTracks: " + this.showSessionTracks);
this.router.navigate(["event/session-tracks"], { queryParams: { id: this.readableEventId } });
} else if (this.showSpeakers) {
console.log("Event Component.ts showSpeakers: " + this.showSpeakers);
this.router.navigate(["event/speakers"], { queryParams: { id: this.readableEventId } });
} else if (this.showPasses) {
console.log("Event Component.ts showPasses: " + this.showPasses);
this.router.navigate(["event/pass-information"], { queryParams: { id: this.readableEventId } });
}
} else {
console.log("Event Component.ts showsession: " + this.showPasses);
this.router.navigate(["event/sessions"], { queryParams: { id: this.readableEventId} });
}
Kind Regards
Abhilash.
André Arnaud de Cal...
291,971
Super User 2025 Season 1
Martin Dráb
230,846
Most Valuable Professional
nmaenpaa
101,156