Display

Empty

Empty-state placeholder for when the underlying data is missing. Project a description and an optional [wrEmptyActions] row.

Installation

import { WrEmpty } from 'ngwr/empty';

@Component({ imports: [WrEmpty] })
export class MyComponent {}

Default

<wr-empty />
No data

With description and action

<wr-empty iconName="search" title="No results">
  Try a different query or clear filters.
  <ng-container wrEmptyActions>
    <wr-btn (click)="reset()">Reset filters</wr-btn>
  </ng-container>
</wr-empty>
No results
Try a different query or clear filters.
Reset filters

API

NameDescriptionTypeDefault
iconRender the built-in folder glyph. Pass false to show no icon at all. Ignored when iconName is set — the same contract as <wr-alert>. This used to be typed as an icon NAME, which it never was: whatever name you passed, the template drew the folder. Any truthy value still shows it, so nothing that compiled before behaves differently.booleantrue
iconNameShow any registered ngwr icon instead of the built-in glyph.WrIconName | nullnull
titleHeadline. Falls back to empty.noData from WrI18n, then 'No data'.string | nullnull