1
,我打電話:AngularJS:角UI路由器state.go上的離子棱角應用程序失敗
$state.go("main.crudlist");
,並具有響應以下異常:
Error: Could not resolve 'entry' from state 'main'
at Object.transitionTo (angular-ui-router.min.js:3074)
at Object.go (angular-ui-router.min.js:3007)
at angular-ui-router.min.js:4057
at angular.min.js:138
at e (angular.min.js:40)
at angular.min.js:44
那是什麼入口應該是什麼意思?
這裏的狀態聲明:
$ stateProvider .STATE( '登錄',{ URL: '/登錄', templateUrl: '內容/移動/模板/ login.html的', 控制器: 「的LoginController」 })
.state('settings', {
url: '/settings',
templateUrl: 'Content/Mobile/templates/settings.html',
controller: 'SettingsController'
})
// setup an abstract state for the tabs directive
.state('main', {
url: "/main",
templateUrl: "Content/Mobile/templates/main.html",
abstract: true,
controller: 'MainController'
})
.state('main.home', {
url: '/home',
views: {
'main': {
templateUrl: 'Content/Mobile/templates/home.html',
controller: 'HomeController'
}
}
})
.state('main.settings', {
url: '/settings',
views: {
'main': {
templateUrl: 'Content/Mobile/templates/settings.html',
controller: 'SettingsController'
}
}
})
.state('main.crudlist', {
url: "/crudlist",
views: {
'main': {
templateUrl: "Content/Mobile/templates/crudlist.html",
controller: 'CrudListController'
}
}
})
'abstract:true'很可能是您的問題。取下'main',看看會發生什麼 – scniro
等待,但主要是應該是抽象的,我猜。 儘管如此,嘗試過,仍然有同樣的例外。 –