API reference
Directive selector
The primitive attaches only to button[tngPress] and a[tngPress]. That keeps the semantics tight and avoids pretending arbitrary elements are buttons.
Supported hosts
html
<button tngPress type="button">Press host</button>
<a tngPress>Anchor button host</a>
Inputs and attrs
Host normalization
On anchors without href, the primitive adds role="button", normalizes Enter and Space activation, and manages tabindex based on disabled state. On native buttons, it forwards type and disabled.
Disclosure anchor
html
<a
tngPress
[ariaHasPopup]="'menu'"
[ariaExpanded]="open()"
[ariaControls]="'release-actions'"
[disabled]="isDisabled()"
>
Release actions
</a>
<div id="release-actions" [hidden]="!open()">...</div>