UNPKG

@progress/kendo-angular-dropdowns

Version:
52 lines (51 loc) 1.74 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /* tslint:disable:max-line-length */ var core_1 = require("@angular/core"); /** * Used for rendering content when there is no data present. * * To define the no-data template, nest a `<ng-template>` tag with the `kendo<ComponentName>NoDataTemplate` directive inside the component tag. * * You can use: * - The `kendoAutoCompleteNoDataTemplate` directive for the AutoComplete. * - The `kendoComboBoxNoDataTemplate` directive for the ComboBox. * - The `kendoDropDownListNoDataTemplate` directive for the DropDownList. * - The `kendoMultiSelectNoDataTemplate` directive for the MultiSelect. * * * @example * ```ts * _@Component({ * selector: 'my-app', * template: ` * <kendo-combobox [data]="listItems"> * <ng-template kendoComboBoxNoDataTemplate> * <h4>No data!</h4> * </ng-template> * </kendo-combobox> * ` * }) * class AppComponent { * public listItems: Array<string> = []; * } * ``` * * For more examples, refer to the article on [templates]({% slug templates_ddl_kendouiforangular %}). */ var NoDataTemplateDirective = (function () { function NoDataTemplateDirective(templateRef) { this.templateRef = templateRef; } return NoDataTemplateDirective; }()); NoDataTemplateDirective.decorators = [ { type: core_1.Directive, args: [{ selector: '[kendoDropDownListNoDataTemplate],[kendoComboBoxNoDataTemplate],[kendoAutoCompleteNoDataTemplate],[kendoMultiSelectNoDataTemplate]' },] }, ]; /** @nocollapse */ NoDataTemplateDirective.ctorParameters = function () { return [ { type: core_1.TemplateRef, }, ]; }; exports.NoDataTemplateDirective = NoDataTemplateDirective;