From beb00b22ec7903496e2f1d6601f6045ef064940a Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Thu, 26 Feb 2026 11:05:49 +0000 Subject: [PATCH] refactor: simplify breadcrumb component template syntax for clarity - Replaced switch-case syntax with if-else statements in breadcrumb.component.html to enhance readability and maintainability of the template logic. - Streamlined the rendering of breadcrumb items while preserving functionality. --- .../lib/breadcrumb/breadcrumb.component.html | 37 +++++++++---------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/lib/content-services/src/lib/breadcrumb/breadcrumb.component.html b/lib/content-services/src/lib/breadcrumb/breadcrumb.component.html index c3cdd9bc15..1f51708b2c 100644 --- a/lib/content-services/src/lib/breadcrumb/breadcrumb.component.html +++ b/lib/content-services/src/lib/breadcrumb/breadcrumb.component.html @@ -41,27 +41,24 @@ [class.adf-active]="last" title="{{ item.name ?? '' | translate }}" class="adf-breadcrumb-item"> - @switch (breadcrumbItemIsAnchor(last)) { - @case (true) { - - {{ item.name ?? '' | translate }} - - } - @default { -
- {{ (selectedRowItemsCount < 1 ? item.name ?? '' : 'BREADCRUMB.HEADER.SELECTED') | translate: { count: selectedRowItemsCount } }} -
- } - } + @if (breadcrumbItemIsAnchor(last)) { + + {{ item.name ?? '' | translate }} + + } @else { +
+ {{ (selectedRowItemsCount < 1 ? item.name ?? '' : 'BREADCRUMB.HEADER.SELECTED') | translate: { count: selectedRowItemsCount } }} +
+ } - @if (!last) { - - } + @if (!last) { + + } }