Skip to content

GridHeaderContent

Since v1.7.0

Declarative wrapper around the grid’s imperative ShellPlugin.registerHeaderContent API.

Captures an <ng-template> and mounts it as an Angular embedded view into the slot the grid provides for header content. Must be a child of <tbw-grid>.

<tbw-grid [rows]="rows" [gridConfig]="config">
<tbw-grid-header-content id="calendar-nav" [order]="0">
<ng-template let-grid>
<app-header-nav [year]="year()" (yearChange)="setYear($event)" />
</ng-template>
</tbw-grid-header-content>
</tbw-grid>
PropertyTypeDescription
idInputSignal<string | undefined>Unique identifier for this header content entry. Optional — defaults to a stable generated id.
orderInputSignal<number>Render order priority. Lower values appear first.
templateSignal<TemplateRef<any> | undefined>The template to mount into the grid’s header content slot.

Default: 100


Type guard for template context inference.

ngTemplateContextGuard(_dir: GridHeaderContent, ctx: unknown): ctx
NameTypeDescription
_dirGridHeaderContent
ctxunknown

AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://toolboxjs.com/llms-full.txt