-
Notifications
You must be signed in to change notification settings - Fork 102
Description
Hi all,
There is some issue i am facing in state navigation , i have two module lets say main module and list module.where list module is child of main module and getting loaded lazily.
but when i am trying to change the state from child module to parent module its not happening.
below is the snippet of code i am trying to do.
main module route
const mainState = {
name: "main",
url: "/main",
isLoginRequired: true,
component: "mainComponent"
};
const homeState = {
parent: 'main',
name: "home",
url: '/home',
component: "homeComponent",
isLoginRequired: true,
lazyLoad: (
return moduleResolver(
import('../home/home.module'), 'HOME_MODULE');
}
};
const canvasListState = {
parent: 'main',
name: "canvasList.**",
url: '/canvas-list/:projectCode?viewType',
component: "listComponent",
isLoginRequired: true,
lazyLoad: (
return moduleResolver(
import('../canvas/list/list.module'), 'LIST_MODULE');
}
};
const drawCanvasState = {
parent: "main",
name: "drawCanvas.**",
url: '/draw-canvas',
lazyLoad: ($transition$ ) => {
return moduleResolver($transition$ , () =>
import('../canvas/draw/draw.module'), 'DRAW_CANVAS_MODULE');
}
};
canvaslist module route
const canvasListState = {
parent: 'main',
name: "canvasList",
url: "/canvas-list/:projectCode?viewType",
params: {
redirecturi: null,
projectCode: null,
viewType: null
},
accessCode: ENUM.ACCESS_CONTROL_LIST.CANVAS_VIEW,
component: "listComponent"
};
now from listComponent if i am saying $state.go('main.drawCanvas.compose').then its not navigating anymore.but if i say $state.go('main') then navigation is getting triggered.