You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I have a stencil-router-link with a url property of "/view?doc=/assets/packages/core/about.md", the link will not be marked active when I navigate to the router through the router link or by editing the browser URL. As far as I can tell from the router source, using the matchPath() utility function does not take into account the search or query properties of the RouterHistory.location object.
Expected behavior:
Even when using URLs with a query string, I would expect the active class to be set if the current browser URL is an exact match.
I can provide a complete Plunker if needed, but it is pretty easy to reproduce,
I believe the problem starts here in the router-link.tsx file:
// Identify if the current route is a match.
@Watch('location')computeMatch(){if(this.location){this.match=matchPath(this.location.pathname,{path: this.urlMatch||this.url,exact: this.exact,strict: this.strict});}
As you can see the search and query parameters are not being take into account when calling the matchPath() function.
Other information:
The text was updated successfully, but these errors were encountered:
Of the five meta tags in the index.html, one was using non-self-closing-tag syntax and the others were not. Additionally, since this is html5 (not xhtml) self-closing tags are not necessary for void elements. This change makes all the meta tags consistent, and most correct.
Resources:
Before submitting an issue, please consult our docs.
Stencil version: (run
npm list @stencil/core
from a terminal/cmd prompt and paste output below):-- @stencil/core@0.12.4
-- @stencil/router@0.2.7-4
I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com
Current behavior:
If I have a stencil-router-link with a url property of "/view?doc=/assets/packages/core/about.md", the link will not be marked active when I navigate to the router through the router link or by editing the browser URL. As far as I can tell from the router source, using the matchPath() utility function does not take into account the search or query properties of the RouterHistory.location object.
Expected behavior:
Even when using URLs with a query string, I would expect the active class to be set if the current browser URL is an exact match.
Steps to reproduce:
Related code:
I can provide a complete Plunker if needed, but it is pretty easy to reproduce,
I believe the problem starts here in the router-link.tsx file:
As you can see the search and query parameters are not being take into account when calling the matchPath() function.
Other information:
The text was updated successfully, but these errors were encountered: