Directing the user to a child state when they are transitioning to its parent state using UI-Router

前端 未结 9 688
忘掉有多难
忘掉有多难 2020-11-30 19:06

Consider the following:

.state(\'manager.staffList\', {url:\'^/staff?alpha\', templateUrl: \'views/staff.list.html\', data:{activeMenu: \'staff\'}, controlle         


        
9条回答
  •  渐次进展
    2020-11-30 19:22

    In "angular-ui-router": "0.2.13", I don't think @nfiniteloop's redirect solution will work. It worked once I had rolled back to to 0.2.12 (and may have had to put the $urlRouterProvider.when call before the $stateProvider?)

    see https://stackoverflow.com/a/26285671/1098564

    and https://stackoverflow.com/a/27131114/1098564 for a workaround (if you don't want to go back to 0.2.12)

    as of Nov 28 2014, https://github.com/angular-ui/ui-router/issues/1584 indicates that it should work again in 0.2.14

提交回复
热议问题