@volo/ngx-lepton-x.core 4.3.2 → 4.3.4
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.
|
@@ -223,10 +223,10 @@ class StyleService {
|
|
|
223
223
|
async loadStyle(style, direction) {
|
|
224
224
|
return new Promise((resolve) => {
|
|
225
225
|
const linkElement = this.createLinkElem(style, direction, resolve);
|
|
226
|
-
|
|
227
|
-
const
|
|
228
|
-
if (
|
|
229
|
-
|
|
226
|
+
// Find styles.css to insert before it
|
|
227
|
+
const stylesCss = this.document.querySelector('link[rel="stylesheet"][href*="styles"]');
|
|
228
|
+
if (stylesCss) {
|
|
229
|
+
stylesCss.insertAdjacentElement('beforebegin', linkElement);
|
|
230
230
|
}
|
|
231
231
|
else {
|
|
232
232
|
this.document.head.appendChild(linkElement);
|
|
@@ -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;
|