diff --git a/examples/angular/basic/src/app/app.component.html b/examples/angular/basic/src/app/app.component.html index cef2752dc6..68c81953a6 100644 --- a/examples/angular/basic/src/app/app.component.html +++ b/examples/angular/basic/src/app/app.component.html @@ -13,7 +13,7 @@ let header " > - {{ header }} +
} @@ -33,7 +33,7 @@ let cell " > - {{ cell }} + } diff --git a/examples/angular/basic/src/app/app.component.ts b/examples/angular/basic/src/app/app.component.ts index 6ef9e63a95..4d3f8059f6 100644 --- a/examples/angular/basic/src/app/app.component.ts +++ b/examples/angular/basic/src/app/app.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectionStrategy, Component, - type OnInit, + Injectable, signal, } from '@angular/core' import { RouterOutlet } from '@angular/router' @@ -88,11 +88,10 @@ const defaultColumns: ColumnDef|
+ @if (!header.isPlaceholder) {
+ |
+ }
+
|---|
|
+ |
+ }
+
|
+ @if (!header.isPlaceholder) {
+ |
+ }
+
{{ stringifiedColumnOrdering() }}
+|
+
+ @if (!header.isPlaceholder) {
+
+
+ @if (!header.isPlaceholder && header.column.getCanPin()) {
+
+ @if (header.column.getIsPinned() !== 'left') {
+
+ }
+
+ @if (header.column.getIsPinned()) {
+
+ }
+
+ @if (header.column.getIsPinned() !== 'right') {
+
+ }
+
+ }
+
+
+
+ |
+ }
+
|---|
|
+ |
+ }
+
{{ stringifiedColumnPinning() }}
diff --git a/examples/angular/column-pinning-sticky/src/app/app.component.ts b/examples/angular/column-pinning-sticky/src/app/app.component.ts
new file mode 100644
index 0000000000..c5ac8ada05
--- /dev/null
+++ b/examples/angular/column-pinning-sticky/src/app/app.component.ts
@@ -0,0 +1,138 @@
+import {
+ ChangeDetectionStrategy,
+ Component,
+ computed,
+ signal,
+} from '@angular/core'
+import {
+ Column,
+ ColumnDef,
+ type ColumnOrderState,
+ type ColumnPinningState,
+ createAngularTable,
+ FlexRenderDirective,
+ getCoreRowModel,
+ type VisibilityState,
+} from '@tanstack/angular-table'
+import { makeData } from './makeData'
+import { faker } from '@faker-js/faker'
+import { NgStyle, NgTemplateOutlet, SlicePipe } from '@angular/common'
+
+type Person = {
+ firstName: string
+ lastName: string
+ age: number
+ visits: number
+ status: string
+ progress: number
+}
+
+const defaultColumns: ColumnDef|
+
+ @if (!header.isPlaceholder) {
+
+
+ |
+ }
+
|---|
|
+ |
+ }
+
|
+
+ @if (!header.isPlaceholder) {
+
+ |
+ }
+
|---|
|
+ |
+ }
+
|
+
+ @if (!header.isPlaceholder) {
+
+
+ |
+ }
+
|---|
|
+ |
+ }
+
{{ stringifiedColumnPinning() }}
+|
+ @if (!header.isPlaceholder) {
+
+
+
+ @if (header.column.getCanFilter()) {
+
+
+ }
+ }
+ |
+ }
+
|---|
|
+ |
+ }
+
{{ stringifiedFilters() }}
+ |
@if (!header.isPlaceholder) {
- @if (header.id == 'select') {
-
- } @else {
-
-
- }
+ @if (header.column.getCanFilter()) {
+
+
}
}
|
@@ -46,25 +37,15 @@
|---|
|
- @if (cell.id.endsWith('select')) {
-
- } @else {
- |
}