diff --git a/packages/router/src/components/route-link/route-link.tsx b/packages/router/src/components/route-link/route-link.tsx index e5da8d8..b85d38a 100644 --- a/packages/router/src/components/route-link/route-link.tsx +++ b/packages/router/src/components/route-link/route-link.tsx @@ -92,10 +92,12 @@ export class RouteLink implements ComponentInterface { anchorAttributes.class[this.anchorClass] = true; } + const href = this.url && this.root ? getUrl(this.url, this.root) : this.url; + if (this.custom === 'a') { anchorAttributes = { ...anchorAttributes, - href: this.url, + href: href, title: this.anchorTitle, role: this.anchorRole, tabindex: this.anchorTabIndex,