# TbwHeader

> _Since v2.5.0_

Structural directive that supplies a full header cell template for a column.

You own the header content: use `renderSortIcon()` and `renderFilterButton()`
from the context to opt back into the built-in affordances. Resize handles
are appended automatically for resizable columns.

#### Example

```html
<tbw-grid-column field="salary">
  <span *tbwHeader="let value; column as column">
    💰 {{ value }}
  </span>
</tbw-grid-column>
```

## Methods

### ngOnDestroy()

A callback method that performs custom clean-up, invoked immediately
before a directive, pipe, or service instance is destroyed.

```ts
ngOnDestroy(): void
```

***

### ngTemplateContextGuard()

Static type guard so `let value` / `column as column` infer correctly.

```ts
ngTemplateContextGuard(dir: TbwHeader, ctx: unknown): ctx
```

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| `dir` | <code><a href="/grid/angular/api/directives/tbwheader/">TbwHeader</a></code> |  |
| `ctx` | <code>unknown</code> |  |

***
