-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Angular] *scRouterLink breaks link generation #815
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/sitecore-jss/edge-e2e-styleguide/DDx3SeAv2YamNmyJ2PmUoaNncsXN [Deployment for 4fe403c failed] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with a question / suggestion on tests.
packages/sitecore-jss-angular/src/components/router-link.directive.spec.ts
Outdated
Show resolved
Hide resolved
* Strip querystring params from ScRouterLink href * Update tests for router-link * Use navigateByUrl instead
* Strip querystring params from ScRouterLink href * Update tests for router-link * Use navigateByUrl instead
Currently with SXA, this Angular component will add querystring params to the end of the
href
of the link, for example/test
becomes/test?sc_site=this-sitename
. This PR adds a tested function that strips the querystring params off of the intended path, resulting in correct client side routing.Limitations of this component include being unable to access an external link, for such scenarios please use *scLink
Description / Motivation
Hotfix request
Testing Details
Tested on SC 10.2 with JSS 20 and SC 10.0 with JSS 16 + SXA
Types of changes
/docs
directory)