2
我有像登录页面,userdetails,商店,预订.once用户登录选择商店和移动到预订页面,而无需输入userdetails.in预订页面onsubmit我想检查userdetaills是否已经存在r不,如果它不存在我需要重定向到我的个人资料一旦用户提交的细节正确再次需要重定向到预订page.if用户登录并提交userdetails propery,并选择那个时间我不想要页面重定向我想这里$ location.path()将无法工作 如何根据条件做angularjs动态路由?
routes
angular
.module('myaccount')
.config(['$stateProvider',
function($stateProvider)
$stateProvider
.state('myaccount', {
\t \t \t \t \t resolve:{
\t \t \t \t \t \t \t "check":function($location)
\t \t \t \t \t \t \t \t {
\t \t \t \t \t \t \t \t \t
\t \t \t \t \t \t \t \t }
\t \t \t \t \t \t \t },
url: '/myaccount',
templateUrl: 'modules/myaccount/views/myaccount.html',
controller: 'MyaccountController'
});
}
]);