a-wc-router icon indicating copy to clipboard operation
a-wc-router copied to clipboard

Default route for nested routing

Open fehmi opened this issue 5 months ago • 0 comments

I’m integrating AWC Router to https://github.com/fehmi/simply.js

The path="/" is working in main routes but not in nested routes. Is there way to make it work same way with the main routes for nested routes? It's not a big issue, we can load a child home component like below.

<an-outlet><child-home></child-home></an-outlet>

The only downside is we can't import the component dynamicaly like below.

<a-router>
    <an-outlet></an-outlet>
    <a-route path="/" element="entry-list-component" lazyload="true" import="./entry-list.js"></a-route>
    ...
</a-router>

Related to: https://github.com/colscott/a-wc-router/issues/2

fehmi avatar Sep 01 '24 09:09 fehmi