WarUI

Angular ng-template Cell Templates

GRID-A02-F12P0baselinePlanned

Lets columns use <ng-template> with a typed context for cells, headers and editors, declared directly in the component template. Directive-based declaration keeps markup idiomatic, and strict template type-checking catches binding errors.

Planned. This page shows the specification from issue #178. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

A grid with status chip and actions templates, plus a header template with a filter button.

Expected behavior

Templates render inside cells and recycle on scroll. Template context type errors show up in the IDE and at compile time.

Planned API surface

warCell directivewarHeader directivewarEditor directiveWarCellContext<T> with static ngTemplateContextGuard$implicit row, value, column

Acceptance criteria

  • ngTemplateContextGuard provides typed $implicit and named context (pending)
  • Embedded views are destroyed when their rows leave the viewport, so the count stays bounded (pending)
  • Dependency injection from the host component injector is available inside templates (pending)
  • Editor templates receive commit/cancel callbacks (pending)