UNPKG

@progress/kendo-angular-gantt

Version:
47 lines (46 loc) 2.23 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, Optional, TemplateRef } from '@angular/core'; import * as i0 from "@angular/core"; /** * Defines a template for the text content section of the task component. * Place an `<ng-template>` tag with the `kendoGanttTaskContentTemplate` directive inside the `<kendo-gantt>` tag to set the template. * * The template context uses the current data item. * * @example * ```ts-preview * _@Component({ * selector: 'my-app', * template: ` * <kendo-gantt [kendoGanttHierarchyBinding]="data"> * <ng-template kendoGanttTaskContentTemplate let-dataItem> * {{ dataItem.title }} - {{ dataItem.completionRatio * 100 }}% complete * </ng-template> * </kendo-gantt> * ` * }) * class AppComponent { * public data: any[] = sampleTasks; * } * ``` */ export class GanttTaskContentTemplateDirective { templateRef; constructor(templateRef) { this.templateRef = templateRef; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttTaskContentTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: GanttTaskContentTemplateDirective, isStandalone: true, selector: "[kendoGanttTaskContentTemplate]", ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttTaskContentTemplateDirective, decorators: [{ type: Directive, args: [{ selector: '[kendoGanttTaskContentTemplate]', standalone: true }] }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{ type: Optional }] }] });