ngx-joyride icon indicating copy to clipboard operation
ngx-joyride copied to clipboard

(feature) - Support query parameters for page navigation

Open palsmadal opened this issue 5 years ago • 2 comments

Hi. I have been trying to make a tour of our banking app when I discovered a limitation in the navigation logic. We utilize query parameters on some of our pages to be able to activate a given tab (we use angular/components mat-tab for this). Since the it's not possible to append query params to the navigation of the different steps I'm not able to set up a complete tour of our app.

I made some code for this to work, basically just allowing query params appended on the steps like so:

step1@route1?queryparam1=value1&queryparam2=value2

The JoyrideStepsContainerService.getStepRoute return is also changed to return an object of routerLink and queryParams:

export class StepRoute { routerLink: string; queryParams: any; }

Another solution would be to change the JoyrideOptions.steps to an object where the step, routerLink and queryParams would be separated, but that would break backwards compatibility.

palsmadal avatar Aug 29 '19 08:08 palsmadal

+1 definitely an annoying missing feature. I just changed how my routes work to hack around this for now.

JacobSiegle avatar Aug 18 '20 15:08 JacobSiegle

This is definitely needed. Thanks @palsmadal !

PhilippS93 avatar Mar 10 '22 14:03 PhilippS93