@magic-xpa/angular 4.1200.0-dev4120.155 → 4.1200.0-dev4120.158
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.
@@ -682,7 +682,23 @@ class SubformMagicService {
|
|
682
682
|
if (SubformMagicService.routerContainers.length > 0) {
|
683
683
|
let routeContainer = SubformMagicService.routerContainers[0];
|
684
684
|
SubformMagicService.routerContainers.shift();
|
685
|
-
|
685
|
+
// If the route path is not same, it means that the original route is not available
|
686
|
+
// and the default route is invoked.
|
687
|
+
if (routeContainer.getRouterPath() === routeCommand.routeParams[0])
|
688
|
+
routeContainer.initializeComponent();
|
689
|
+
else {
|
690
|
+
// If the specified router outlet id referring to a different route path, then first clear
|
691
|
+
// the outlet (passing null route params, clears the outlet) and then navigate again.
|
692
|
+
currentSubformMagicService.router.navigate([{ outlets: { [routeCommand.routerOutletName]: null } }], { relativeTo: relativeRoute })
|
693
|
+
.then((result) => {
|
694
|
+
SubformMagicService.currentCallerMgSubformServiceRef = currentSubformMagicService;
|
695
|
+
currentSubformMagicService.currentRouteDefinition = {
|
696
|
+
formName: routeCommand.formName,
|
697
|
+
parameters: routeCommand.parameters
|
698
|
+
};
|
699
|
+
currentSubformMagicService.PerformRouterNavigate(routeCommand.routerOutletName, routeCommand.routeParams);
|
700
|
+
});
|
701
|
+
}
|
686
702
|
}
|
687
703
|
else {
|
688
704
|
currentSubformMagicService.PerformRouterNavigate(routeCommand.routerOutletName, routeCommand.routeParams);
|
@@ -755,6 +771,7 @@ class RouterContainerMagicComponent {
|
|
755
771
|
componentRef = null;
|
756
772
|
parentMgSubformService = null;
|
757
773
|
static lastRoute = "/";
|
774
|
+
routePath = null;
|
758
775
|
static get LastRoute() {
|
759
776
|
return RouterContainerMagicComponent.lastRoute;
|
760
777
|
}
|
@@ -805,7 +822,7 @@ class RouterContainerMagicComponent {
|
|
805
822
|
if (calcRouterPath.length > 0) {
|
806
823
|
let routerPath = calcRouterPath;
|
807
824
|
let tokens = StrUtil.tokenize(routerPath, "/:");
|
808
|
-
guiEvent.RouterPath = tokens[0];
|
825
|
+
this.routePath = guiEvent.RouterPath = tokens[0];
|
809
826
|
guiEvent.RouterParams = new List();
|
810
827
|
for (let i = 1; i < tokens.length; i++) {
|
811
828
|
guiEvent.RouterParams.push(currentActiveRoute.snapshot.params[tokens[i]]);
|
@@ -852,6 +869,9 @@ class RouterContainerMagicComponent {
|
|
852
869
|
RouterContainerMagicComponent.lastRoute = this.router.url;
|
853
870
|
}
|
854
871
|
}
|
872
|
+
getRouterPath() {
|
873
|
+
return this.routePath;
|
874
|
+
}
|
855
875
|
/** @nocollapse */ static ɵfac = function RouterContainerMagicComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || RouterContainerMagicComponent)(i0.ɵɵdirectiveInject(i2.ActivatedRoute), i0.ɵɵdirectiveInject(i2.Router), i0.ɵɵdirectiveInject(EngineMagicService), i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(ComponentListMagicService), i0.ɵɵdirectiveInject(CommandsCollectorMagicService), i0.ɵɵdirectiveInject(RouterCommandsMagicService)); };
|
856
876
|
/** @nocollapse */ static ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: RouterContainerMagicComponent, selectors: [["magic-route-outlet"]], standalone: false, decls: 0, vars: 0, template: function RouterContainerMagicComponent_Template(rf, ctx) { }, encapsulation: 2 });
|
857
877
|
}
|