The PacemAnchorElement
mimicks the HTMLAnchorElement
common behavior, including routing capabilities when needed.
If a router is available in the DOM, just refer to it in anchor's router
property/attribute.
It handles the usual events (keyboard, mouse, ...) associated with the a
<a>
element.
<!-- anchor that exploits referenced router' state -->
<pacem-a router="#router0" href="/{culture}/{section}/exponentiation">Go to exp</pacem-a>
<!-- referenced router with dummy/explicit state -->
<pacem-router template="/{culture}/{section}/{page}/{id?}" state="{{ { culture: 'it-it', section: 'arithmetic', page: 'logarithms' } }}" id="router0"></pacem-router>
<!-- anchor should lead to '/it-it/arithmetic/exponentiation' -->
Example: