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:
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.