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
First of all, thanks a lot for this ! it is really well thought through, esp. the way to nest <router-slot>, and allow relative router (smth all other web-component friendly routing lib I had a look at fail to do properly).
The old Polymer <app-location> had a parameter to skip url from being handled by the router based on a regex.
You could for instance do <app-location route="{{route}}" url-space-regex="^(?!/api/).+"></app-location> to skip all url starting with /api.
In app-router, you'd need to add data-router-slot=disabled to all such links. It would be more convenient in some cases to rely on a more generic rule.
I can have a go at trying to add this feature if this is something you might consider adding.
The main difficulty is to find a proper way to inject this additional logic to the ensureAnchorHistory function and call it later on in the instantiation process. Maybe when the root app-router is attached ?
The text was updated successfully, but these errors were encountered:
I was interested in a similar use case and opened #18 which I think will do what you're looking for. It skips any anchor links not handled by the router so if you don't have a catch-all route **, it will allow the browser to handle the routing.
First of all, thanks a lot for this ! it is really well thought through, esp. the way to nest
<router-slot>
, and allow relative router (smth all other web-component friendly routing lib I had a look at fail to do properly).The old Polymer
<app-location>
had a parameter to skip url from being handled by the router based on a regex.You could for instance do
<app-location route="{{route}}" url-space-regex="^(?!/api/).+"></app-location>
to skip all url starting with/api
.In app-router, you'd need to add
data-router-slot=disabled
to all such links. It would be more convenient in some cases to rely on a more generic rule.I can have a go at trying to add this feature if this is something you might consider adding.
The main difficulty is to find a proper way to inject this additional logic to the
ensureAnchorHistory
function and call it later on in the instantiation process. Maybe when the rootapp-router
is attached ?The text was updated successfully, but these errors were encountered: