본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)29k · #9808

getting-started

하는 일

이 스킬은 TanStack Table로 Angular 앱에 표를 만드는 방법을 설명합니다. 열과 데이터를 정의하는 것부터 행을 보여 주는 것까지 다룹니다. 자신만의 표 레이아웃을 만들려는 Angular 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓레코드 목록을 표로 보여 주는 Angular 컴포넌트를 만들 때.
  • ✓Angular 표의 데이터가 시그널에서 오고 화면에서 새로 고쳐져야 할 때.
  • ✓Angular 표에 Query나 Virtual 기능을 추가하고 싶은 경우.

스킬 링크

https://github.com/TanStack/table/blob/main/packages/angular-table/skills/getting-started/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/TanStack/table/blob/main/packages/angular-table/skills/getting-started/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“주문 목록을 보여 주는 표가 Angular 앱에 필요해요. 어떻게 설정하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

컴포넌트 안에서 injectTable을 호출하고 열과 데이터를 넘기는 방법, 그리고 FlexRender 지시어를 사용해 템플릿에서 행을 반복하는 방법을 설명합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Load intent load @tanstack/table-core#core first for the headless model, stable inputs, and column inference.

Setup

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() }))
}

Construction and rendering

Call injectTable in a component, directive, or service field initializer, or another valid Angular injection context. The adapter binds its cleanup to that context.

Signals read in the options initializer rerun it and call setOptions. Keep features, factories, and columns outside the initializer; return stable data references and derive transformed data with computed outside it.

Import FlexRender for *flexRender, *flexRenderCell, *flexRenderHeader, and *flexRenderFooter. Render values can be primitives, TemplateRef, component types, or flexRenderComponent(...). Use flexRenderComponent for Angular component types; ordinary render functions are already supported directly.

Read for the task

  • When adding or configuring optional features, load intent load @tanstack/table-core#table-features and read only references for the requested behavior.
  • For state ownership or reactive reads, read table-state.
  • When tables share features, defaults, or reusable UI, read create-table-hook.
  • When Query supplies data or server processing, read with-tanstack-query.
  • When virtualizing rows or columns, read with-tanstack-virtual.
  • When upgrading v8 code, read migrate-v8-to-v9.

API discovery

Inspect node_modules/@tanstack/angular-table/dist/types/ for the bundled public declarations. Inspect feature APIs under node_modules/@tanstack/table-core/dist/features/.

자주 묻는 질문

injectTable은 어디서 호출해야 하나요?

컴포넌트나 서비스 필드, 또는 다른 유효한 Angular 주입 컨텍스트에서 호출하면 정리 작업이 자동으로 처리됩니다.

데이터가 시그널이면 어떻게 되나요?

시그널이 바뀔 때 옵션이 다시 실행되므로 표가 새 값으로 업데이트됩니다.

열은 컴포넌트 밖에서 정의해야 하나요?

네, 기능과 열은 반응형 옵션 밖에 두도록 권합니다. 그래야 업데이트할 때마다 다시 만들어지지 않습니다.

상세 정보

작성자의 원본 설명

Create and render Table v9 with the angular adapter. Route reusable createTableHook components, Query and Virtual integration, and framework setup; use table-state for reactive ownership.

repo: TanStack/table

인기도

GitHub 스타
29k
순위
#9808
라이선스
MIT
업데이트
2026. 10. 21.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬