我有两个routes
路由到一个controller
叫storyboard
.
一个有 $routeParams,一个没有。
$routeProvider.when('/storyboard/:cureId',
{
templateUrl: '/partials/storyboard.html',
controller: 'Storyboard',
access: access.parent,
area: 'storyboard'
});
$routeProvider.when('/storyboard/addTarget',
{
templateUrl:'/partials/storyboard_new_target.html',
controller: 'Storyboard',
access: access.supervisor,
area: 'storyboard'
});
$routeProvider.when('/storyboard/addSession',
{
templateUrl:'/partials/storyboard_new_session.html',
controller: 'Storyboard',
access: access.parent,
area: 'storyboard'
});
$routeProvider.otherwise({redirectTo:'/404'});
但是当我打电话给/storyboard/addSession
Angular 时,我总是将我重定向到/storyboard/addSession
,并addSession
使用 $routeParams。