ui-router / sample-app-angularjs

UI-Router for AngularJS - Sample Application
http://ui-router.github.io/sample-app-angularjs/#/mymessages/inbox/5648b50cc586cac4aed6836f
242 stars 102 forks source link

state navigation not happening #69

Open xtreme1397 opened 6 years ago

xtreme1397 commented 6 years ago

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: ($transition$) => { return moduleResolver($transition$, () => import('../home/home.module'), 'HOME_MODULE'); } };

const canvasListState = { parent: 'main', name: "canvasList.**", url: '/canvas-list/:projectCode?viewType', component: "listComponent", isLoginRequired: true, lazyLoad: ($transition$) => { return moduleResolver($transition$, () => 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.

xtreme1397 commented 6 years ago

any update?please help me out.