Public constructor of this custom RouterLink element. This constructor is called whenever a new instance this custom element is being rendered into a Document.
Static Readonly observedArray of attribute names that should be observed for changes, which will trigger the Component.attributeChangedCallback. This element only observes its href attribute.
Readonly onclickOverridden onclick handler, preventing the default browser behavior and invoking Router.navigate instead.
The onclick fired MouseEvent.
Private Readonly routerThis method is called whenever this element's href attribute is
added, removed or changed. The next attribute value is used to determine
whether to Router.rebase the href.
The _name of the changed attribute (ignored).
Optional _prev: stringThe _previous value of the changed attribute (ignored).
Optional next: stringThe next value of the changed attribute.
Generated using TypeDoc
Custom element extending the HTMLAnchorElement. This element provides a declarative way to invoke the Router.navigate method within the bounds of the RouterOutlet, while maintaining compatibility with SSR/SEO aspects of SPAs. This is achieved by rewriting its href against the RouterOutlet.baseHref and intercepting the default browser behavior when onclicked.
Example
A
router-link:See
Router