它应该路由到/ users / me /而不是路由到/ users //
如果我手动编写/ users / me / url或使用链接移动那里,一切正常.但转变不会做我所期望的,我无法弄清楚为什么.
如果我手动编写/ users / me / url或使用链接移动那里,一切正常.但转变不会做我所期望的,我无法弄清楚为什么.
在我的代码中,我有:
$state.transitionTo('users.me');
在我的路线(州)配置我有:
state('users',{ abstract:true,templateUrl: '/path/to/template.html',access: { isPrivate: 0 },resolve: { ...a resolve block.. }).state('users.me',{ url: '/users/:id/',controller: 'userCtrl',views:{ 'userView':{ templateUrl:'/path/to/template.html'',controller:'userCtrl',},'view1':{ templateUrl:'/path/to/template.html'',controller:'anotherCtrl','view2':{ templateUrl:'/path/to/template.html'','view3':{ templateUrl:'/path/to/template.html'','view4':{ templateUrl:'/path/to/template.html',controller:'anotherCtrl' } }
我很乐意为此提供帮助