Create an Angular TanStack Table v9 table with injectTable inside injection context, explicit stable tableFeatures and columns, signal-backed data, and FlexRender structural directives or helpers.
60
72%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./packages/angular-table/skills/getting-started/SKILL.mdThis skill builds on @tanstack/table-core#core and @tanstack/table-core#table-features. Read them first for the headless model and explicit features.
import { Component, signal } from '@angular/core'
import { FlexRender, injectTable, tableFeatures } from '@tanstack/angular-table'
type Person = { name: string; age: number }
const features = tableFeatures({})
const columns = [
{ accessorKey: 'name', header: 'Name' },
{ accessorKey: 'age', header: 'Age' },
]
@Component({
selector: 'app-table',
imports: [FlexRender],
template: `<table>
<tbody>
@for (row of table.getRowModel().rows; track row.id) {
<tr>
@for (cell of row.getAllCells(); track cell.id) {
<td>
<ng-container *flexRenderCell="cell; let value">{{
value
}}</ng-container>
</td>
}
</tr>
}
</tbody>
</table>`,
})
export class TableComponent {
readonly data = signal<Person[]>([{ name: 'Ada', age: 36 }])
readonly table = injectTable(() => ({ features, columns, data: this.data() }))
}injectTable reruns its options initializer when a signal read changes. Define features, row-model factories, and columns at module or stable class scope; read only changing values inside.
Import FlexRender for *flexRender, *flexRenderCell, *flexRenderHeader, and *flexRenderFooter. Definitions may yield primitives, TemplateRef, component types, or flexRenderComponent(...); Table does not supply markup or CSS.
Wrong:
export function makeTable() {
return injectTable(() => ({ features, columns, data }))
}Correct:
export class TableComponent {
readonly table = injectTable(() => ({ features, columns, data: this.data() }))
}injectTable asserts an Angular injection context and registers lifecycle cleanup there.
Source: packages/angular-table/src/injectTable.ts
Wrong:
injectTable(() => ({
features: tableFeatures({}),
columns: makeColumns(),
data: this.data(),
}))Correct:
const features = tableFeatures({})
const columns = makeColumns()
injectTable(() => ({ features, columns, data: this.data() }))Every signal change reruns the initializer; rebuilding static inputs invalidates memoized Table work.
Source: packages/angular-table/src/injectTable.ts
Wrong:
cell: () => flexRenderComponent(() => 'value')Correct:
cell: () => 'value'flexRenderComponent wraps an Angular component type; ordinary functions and primitives are handled directly by FlexRender.
Source: docs/framework/angular/guide/rendering.md
Inspect node_modules/@tanstack/angular-table/dist/types/ for the bundled public API; inspect optional feature APIs in installed @tanstack/table-core/dist/features/.
9e523bc
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.