Skip to main content
cngx-src documentation

CngxFilterBuilderEmpty

Directivev0.1.0

projects/forms/filter-builder/filter-builder-slots.ts

Import#

import { CngxFilterBuilderEmpty } from '@cngx/forms/filter-builder'

Description#

Empty-state slot. Replaces the "no filters yet" placeholder shown when the root group has no children. Context: addFilter(), addGroup().

<cngx-filter-builder [fields]="fields" [(value)]="value">
  <ng-template cngxFilterBuilderEmpty let-addFilter="addFilter">
    <button type="button" (click)="addFilter()">Add your first filter</button>
  </ng-template>
</cngx-filter-builder>

Wins over CNGX_FILTER_BUILDER_CONFIG.templates.empty and the built-in default.

Metadata#

Index#

Instance Properties#

templateRef#unknown
Readonly
inject<TemplateRef<CngxFilterBuilderEmptyContext>>(TemplateRef)

Methods#

ngTemplateContextGuard#CngxFilterBuilderEmptyContext
Static
ngTemplateContextGuard(_dir: CngxFilterBuilderEmpty, _ctx: unknown)
@param_ctxunknown