How to use the @delon/util.isEmpty function in @delon/util

To help you get started, we’ve selected a few @delon/util examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ng-alain / delon / packages / abc / desc-list / desc-list-item.component.ts View on Github external
checkContent(): void {
    if (!this.contentElement) {
      return ;
    }
    const el = this.contentElement.nativeElement as HTMLElement;
    const cls = `ad-desc-list__default`;
    if (!this.noDefault && isEmpty(el)) {
      this.renderer.addClass(el, cls);
    } else {
      this.renderer.removeClass(el, cls);
    }
  }
github ng-alain / delon / packages / abc / page-header / page-header.component.ts View on Github external
checkContent() {
    if (isEmpty(this.conTpl.nativeElement)) {
      this.renderer.setAttribute(this.conTpl.nativeElement, 'hidden', '');
    } else {
      this.renderer.removeAttribute(this.conTpl.nativeElement, 'hidden');
    }
  }
github ng-alain / delon / packages / abc / exception / exception.component.ts View on Github external
checkContent() {
    this.hasCon = !isEmpty(this.conTpl.nativeElement);
  }
github ng-alain / delon / packages / abc / view / view.component.ts View on Github external
checkContent() {
    const { conEl } = this;
    const def = this.default;
    if (!(def != null ? def : this.parent.default)) return;
    const el = conEl.nativeElement as HTMLElement;
    const cls = `sv__default`;
    if (el.classList.contains(cls)) {
      el.classList.remove(cls);
    }
    if (isEmpty(el)) {
      el.classList.add(cls);
    }
  }
}
github ng-alain / delon / packages / abc / edit / edit.component.ts View on Github external
checkContent(): void {
    const el = this.contentElement.nativeElement;
    const cls = `${prefixCls}__item-empty`;
    if (isEmpty(el)) {
      this.ren.addClass(el, cls);
    } else {
      this.ren.removeClass(el, cls);
    }
  }