@wizishop/angular-components 14.4.55 → 14.4.57

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.
@@ -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, location) {
2571
+ constructor(router) {
2572
2572
  this.router = router;
2573
- this.location = location;
2574
2573
  this.history = [];
2575
2574
  }
2576
2575
  registerHistory() {
@@ -2582,9 +2581,11 @@ class HistoryService {
2582
2581
  });
2583
2582
  }
2584
2583
  back(link) {
2584
+ const lastlink = this.history[this.history.length - 1];
2585
+ console.log('back', lastlink);
2585
2586
  this.history.pop();
2586
- if (this.history.length > 0) {
2587
- this.location.back();
2587
+ if (this.history.length > 0 && lastlink) {
2588
+ this.router.navigate([lastlink]);
2588
2589
  }
2589
2590
  else {
2590
2591
  this.redirect(link);
@@ -2605,14 +2606,14 @@ class HistoryService {
2605
2606
  this.router.navigate(link);
2606
2607
  }
2607
2608
  }
2608
- HistoryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: HistoryService, deps: [{ token: i1$3.Router }, { token: i1.Location }], target: i0.ɵɵFactoryTarget.Injectable });
2609
+ 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
2610
  HistoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: HistoryService, providedIn: 'root' });
2610
2611
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: HistoryService, decorators: [{
2611
2612
  type: Injectable,
2612
2613
  args: [{
2613
2614
  providedIn: 'root'
2614
2615
  }]
2615
- }], ctorParameters: function () { return [{ type: i1$3.Router }, { type: i1.Location }]; } });
2616
+ }], ctorParameters: function () { return [{ type: i1$3.Router }]; } });
2616
2617
 
2617
2618
  class HeaderPageComponent {
2618
2619
  constructor(historyService, location) {