把案例我有一条路线
.config(function (CONFIG,$routeProvider) {
$routeProvider
.when('/', {
templateUrl: CONFIG.site.path_views + '/index/index.html',
controller: 'IndexCtrl'
})
.when('/contestant/create', {
templateUrl: CONFIG.site.path_views + '/contestant/create.html',
controller: 'ContestantCreateCtrl'
})
.when('/contestant/thanks', {
templateUrl: CONFIG.site.path_views + '/contestant/thanks.html',
controller: 'ContestantThanksCtrl'
})
.when('/product', {
templateUrl: CONFIG.site.path_views + '/product/index.html',
controller: 'ProductCtrl'
})
.when('/prize', {
templateUrl: CONFIG.site.path_views + '/prize/index.html',
controller: 'PrizeCtrl'
})
.otherwise({
redirectTo: '/'
});
})
如果他/她已填写表格,我想拒绝访问或简单地将用户重定向到 /contestant/create 但我没有找到方法:(