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

Matrix url parameters break route matching #182

Open
dbpieter opened this issue Nov 22, 2022 · 1 comment
Open

Matrix url parameters break route matching #182

dbpieter opened this issue Nov 22, 2022 · 1 comment

Comments

@dbpieter
Copy link

dbpieter commented Nov 22, 2022

I'm currently configuring our existing single-spa app to use layout-engine.

<single-spa-router>
  <application name="navigation"></application>

  <route path="some-mfe">
    <application name="some-mfe"></application>
  </route>
</single-spa-router>

When navigating to mydomain.com/some-mfe I see the app being bootstrapped and briefly appearing. However as soon as any matrix parameters are added to the url (ex mydomain.com/some-mfe;pageSize=50;pageNumber=8) the app is unmounted by single-spa. Matrix parameters are commonly used in Angular as routing parameters.
It seems that the route matching algorithm/regex doesn't like the semicolon ?

@filoxo
Copy link
Contributor

filoxo commented Jan 14, 2023

correct, because matrix url parameters aren't an accepted web standard regardless of Angular's usage so support hasn't been added. a URL with them ends up including them in the pathname which I find unexpected but makes sense since they have nowhere else to go. however, i would think it would be relatively easy to support them in matchRoute.js which has an accompanying suite of tests. would the criteria be that those URL params are ignored during matching, just like search params are?

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

No branches or pull requests

2 participants