Skip to content
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

Merged
merged 4 commits into from
Sep 16, 2021
Merged

[Angular] *scRouterLink breaks link generation #815

merged 4 commits into from
Sep 16, 2021

Conversation

CobyPear
Copy link
Contributor

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update (non-breaking change; modified files are limited to the /docs directory)

@CobyPear CobyPear requested a review from a team September 16, 2021 16:26
@vercel
Copy link

vercel bot commented Sep 16, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/sitecore-jss/edge-e2e-styleguide/DDx3SeAv2YamNmyJ2PmUoaNncsXN
✅ Preview: Failed

[Deployment for 4fe403c failed]

Copy link
Contributor

@ambrauer ambrauer left a 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.

@CobyPear CobyPear merged commit 259e67c into dev Sep 16, 2021
@CobyPear CobyPear deleted the bugfix/494145 branch September 16, 2021 19:50
CobyPear added a commit that referenced this pull request Sep 16, 2021
* Strip querystring params from ScRouterLink href

* Update tests for router-link

* Use navigateByUrl instead
CobyPear added a commit that referenced this pull request Sep 16, 2021
CobyPear added a commit that referenced this pull request Sep 16, 2021
* Strip querystring params from ScRouterLink href

* Update tests for router-link

* Use navigateByUrl instead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants