Lazy content slot for {@link CngxContextMenu}
CngxContextMenuContent
Directivev0.1.0WCAG AA
projects/ui/context-menu/context-menu-content.directive.ts
Import#
import { CngxContextMenuContent } from '@cngx/ui/context-menu'
Description#
Lazy content slot for CngxContextMenu. The template renders only
while the menu is open and receives the trigger's per-open datum as
$implicit, so one panel declaration serves every target of a delegated
trigger with row-correct content.
<cngx-context-menu #menu ariaLabel="Row actions">
<ng-template cngxContextMenuContent let-row>
<cngx-context-menu-item (select)="edit(row)">Edit {{ row.name }}</cngx-context-menu-item>
</ng-template>
</cngx-context-menu>Metadata#
Index#
Properties
Methods
Instance Properties#
templateRef#
unknownReadonly
The projected <ng-template>, rendered by the panel while open.
inject<TemplateRef<CngxContextMenuContentContext<T>>>(TemplateRef)Methods#
ngTemplateContextGuard#
CngxContextMenuContentContextStatic
ngTemplateContextGuard(_dir: CngxContextMenuContent<T>, _ctx: unknown)Narrows let- bindings to CngxContextMenuContentContext under strict templates.
@param_ctx
unknown