UNPKG

@progress/kendo-angular-listview

Version:

Kendo UI Angular listview component

44 lines (43 loc) 2.07 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Directive, TemplateRef } from '@angular/core'; import * as i0 from "@angular/core"; /** * Allows customizing the header content of the ListView. To define a header template, nest an `<ng-template>` tag * with the `kendoListViewHeaderTemplate` directive inside the `<kendo-listview>` tag * ([see example]({% slug templates_listview %}#toc-header-template)). * * @example * ```typescript * @Component({ * template: ` * <kendo-listview [data]="items"> * <ng-template kendoListViewHeaderTemplate> * <div class="header-content"> * <h3>Product List</h3> * <button kendoListViewAddCommand>Add New Item</button> * </div> * </ng-template> * </kendo-listview> * ` * }) * export class AppComponent { } * ``` */ export class HeaderTemplateDirective { templateRef; constructor(templateRef) { this.templateRef = templateRef; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HeaderTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: HeaderTemplateDirective, isStandalone: true, selector: "[kendoListViewHeaderTemplate]", ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HeaderTemplateDirective, decorators: [{ type: Directive, args: [{ selector: '[kendoListViewHeaderTemplate]', standalone: true }] }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });