0
我設置的初始狀態先進入應用程序用一個簡單的條件時,(我完全瞭解它也可以防止深層鏈接..這就是OK)。是否有可能使用ui路由器設置初始狀態和其他狀態?
.run(function($state, browserFactory) {
if (browserFactory.isSupported()) {
$state.go('browser-unsupported');
} else {
$state.go('welcome');
}
}
這工作正常。
但是,如果我設置一個otherwise
規則將始終遵循這一規則。例如,如果我設置
.config(function($urlRouterProvider) {
$urlRouterProvider.otherwise('/welcome');
}
它總是會在/welcome
結束。
有沒有辦法解決這個問題,或者根據條件和擁有otherwise
規則來設置初始路由?
的可能的複製[否則上StateProvider](http://stackoverflow.com/questions/16793724/otherwise-on-stateprovider) – estus