@volo/ngx-lepton-x.core 4.3.3 → 4.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1232,8 +1232,8 @@ class BreadcrumbRouteListenerService {
|
|
|
1232
1232
|
combineLatest([
|
|
1233
1233
|
this.router.events.pipe(filter((event) => event instanceof NavigationEnd)),
|
|
1234
1234
|
this.navbarService.navbarItems$.pipe(filter((items) => !!items.length)),
|
|
1235
|
-
]).subscribe(([
|
|
1236
|
-
const currentPath =
|
|
1235
|
+
]).subscribe(([_navigationEvent, items]) => {
|
|
1236
|
+
const currentPath = this.router.url;
|
|
1237
1237
|
let activeItem = this.navbarService.findByLink(currentPath);
|
|
1238
1238
|
let breadcrumbItems;
|
|
1239
1239
|
if (!activeItem.item) {
|
|
@@ -1277,9 +1277,9 @@ class BreadcrumbRouteListenerService {
|
|
|
1277
1277
|
createBreadcrumbTrail(item) {
|
|
1278
1278
|
const trail = [];
|
|
1279
1279
|
let current = item;
|
|
1280
|
-
while (current && current.breadcrumbText) {
|
|
1280
|
+
while (current && (current.breadcrumbText || current.name)) {
|
|
1281
1281
|
trail.push({
|
|
1282
|
-
text: this.localizationService.instant(current.breadcrumbText),
|
|
1282
|
+
text: this.localizationService.instant(current.breadcrumbText || current.name),
|
|
1283
1283
|
icon: current.iconClass,
|
|
1284
1284
|
});
|
|
1285
1285
|
current = current.parent;
|