0
はui.router状態が既にAngularJSで宣言されているかどうかを知ることはできますか?ここ
app.config(function ($stateProvider, $urlRouterProvider) {
var helloState = {
name: 'uploadForm',
url: '/uploadForm',
templateUrl: 'templates/step_Form/form.html?v=' + new Date().getDay()
}
var uploadState = {
name: 'uploadForm.upload',
url: '/upload',
templateUrl: 'templates/step_Form/form-upload.html?v=' + new Date().getDay()
}
var contentState = {
name: 'uploadForm.content',
url: '/content',
templateUrl: 'templates/step_Form/form-content.html?v=' + new Date().getDay()
}
$stateProvider.state(helloState);
$stateProvider.state(uploadState);
$stateProvider.state(contentState);
})
それは既に宣言されている状態をtestifすることが可能です私の$ stateProviderの設定ですか?このよう
:私はリダイレクトで別のページを持っており、それは設定で二回通過して、エラーをするのであなたが$state.get()
を使用することができます
if($stateProvider.state.??? == null)
$stateProvider.state(helloState);
は、