@wizishop/angular-components 14.4.55 → 14.4.56
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.
- package/esm2020/lib/services/history.service.mjs +7 -8
- package/fesm2015/wizishop-angular-components.mjs +6 -6
- package/fesm2015/wizishop-angular-components.mjs.map +1 -1
- package/fesm2020/wizishop-angular-components.mjs +6 -6
- package/fesm2020/wizishop-angular-components.mjs.map +1 -1
- package/lib/services/history.service.d.ts +1 -3
- package/package.json +1 -1
- package/wizishop-angular-components-14.4.56.tgz +0 -0
- package/wizishop-angular-components-14.4.55.tgz +0 -0
|
@@ -2568,9 +2568,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
|
|
|
2568
2568
|
}] } });
|
|
2569
2569
|
|
|
2570
2570
|
class HistoryService {
|
|
2571
|
-
constructor(router
|
|
2571
|
+
constructor(router) {
|
|
2572
2572
|
this.router = router;
|
|
2573
|
-
this.location = location;
|
|
2574
2573
|
this.history = [];
|
|
2575
2574
|
}
|
|
2576
2575
|
registerHistory() {
|
|
@@ -2582,9 +2581,10 @@ class HistoryService {
|
|
|
2582
2581
|
});
|
|
2583
2582
|
}
|
|
2584
2583
|
back(link) {
|
|
2584
|
+
const lastlink = this.history[this.history.length - 1];
|
|
2585
2585
|
this.history.pop();
|
|
2586
|
-
if (this.history.length > 0) {
|
|
2587
|
-
this.
|
|
2586
|
+
if (this.history.length > 0 && lastlink) {
|
|
2587
|
+
this.router.navigate([lastlink]);
|
|
2588
2588
|
}
|
|
2589
2589
|
else {
|
|
2590
2590
|
this.redirect(link);
|
|
@@ -2605,14 +2605,14 @@ class HistoryService {
|
|
|
2605
2605
|
this.router.navigate(link);
|
|
2606
2606
|
}
|
|
2607
2607
|
}
|
|
2608
|
-
HistoryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: HistoryService, deps: [{ token: i1$3.Router }
|
|
2608
|
+
HistoryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: HistoryService, deps: [{ token: i1$3.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2609
2609
|
HistoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: HistoryService, providedIn: 'root' });
|
|
2610
2610
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: HistoryService, decorators: [{
|
|
2611
2611
|
type: Injectable,
|
|
2612
2612
|
args: [{
|
|
2613
2613
|
providedIn: 'root'
|
|
2614
2614
|
}]
|
|
2615
|
-
}], ctorParameters: function () { return [{ type: i1$3.Router }
|
|
2615
|
+
}], ctorParameters: function () { return [{ type: i1$3.Router }]; } });
|
|
2616
2616
|
|
|
2617
2617
|
class HeaderPageComponent {
|
|
2618
2618
|
constructor(historyService, location) {
|