Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 9203b0b

Browse files
committed
feat: render header and footer content children
1 parent 2d816da commit 9203b0b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<div id="slickGridContainer-{{gridId}}" class="gridPane">
2+
<ng-container *ngTemplateOutlet="slickgridHeader"></ng-container>
23
<div attr.id='{{gridId}}' class="slickgrid-container" style="width: 100%">
34
</div>
5+
<ng-container *ngTemplateOutlet="slickgridFooter"></ng-container>
46
</div>

src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ import {
33
ApplicationRef,
44
ChangeDetectorRef,
55
Component,
6+
ContentChild,
67
ElementRef,
78
EventEmitter,
89
Inject,
910
Input,
1011
OnDestroy,
1112
Optional,
1213
Output,
14+
TemplateRef,
1315
} from '@angular/core';
1416
import { TranslateService } from '@ngx-translate/core';
1517
import { Observable } from 'rxjs';
@@ -265,6 +267,9 @@ export class AngularSlickgridComponent<TData = any> implements AfterViewInit, On
265267
return this._registeredResources;
266268
}
267269

270+
@ContentChild('slickgridHeader', { static: true }) slickgridHeader?: TemplateRef<any>;
271+
@ContentChild('slickgridFooter', { static: true }) slickgridFooter?: TemplateRef<any>;
272+
268273
constructor(
269274
protected readonly angularUtilService: AngularUtilService,
270275
protected readonly appRef: ApplicationRef,

0 commit comments

Comments
 (0)