Skip to content

Instantly share code, notes, and snippets.

@wh0th3h3llam1
Created March 29, 2022 11:40
Show Gist options
  • Save wh0th3h3llam1/bfc453201eab14b63609830c98f50dae to your computer and use it in GitHub Desktop.
Save wh0th3h3llam1/bfc453201eab14b63609830c98f50dae to your computer and use it in GitHub Desktop.
<div>
<nz-breadcrumb [nzSeparator]="separatorTemplate">
<nz-breadcrumb-item *ngFor="let breadcrumb of breadcrumbs">
<ng-container *ngIf="breadcrumb.isClickable; else notClickable">
<a [routerLink]="breadcrumb.url">
<ng-container *ngIf="breadcrumb.icon; else noIcon">
<i nz-icon [nzType]="breadcrumb.icon"></i>
</ng-container>
<ng-template #noIcon>
<img [src]="breadcrumb.image" height="20px" width="20px" alt="" *ngIf="breadcrumb.image;">
</ng-template>
{{ breadcrumb.label }}
</a>
</ng-container>
<ng-template #notClickable>
<ng-container *ngIf="breadcrumb.icon; else noIcon">
<i nz-icon [nzType]="breadcrumb.icon"></i>
</ng-container>
<ng-template #noIcon>
<img [src]="breadcrumb.image" height="20px" width="20px" alt="" *ngIf="breadcrumb.image;">
</ng-template>
{{ breadcrumb.label }}
</ng-template>
</nz-breadcrumb-item>
<ng-template #separatorTemplate><i nz-icon nzType="arrow-right"></i></ng-template>
</nz-breadcrumb>
<br>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment