Раньше я использовал ng-route (работал нормально), но теперь мне нужен ui-routing.Поскольку я не очень хорошо знаком с AngularJs и совсем не знаком с ui-router
, я просто выполнил простую настройку: -
myApp.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise("/award_config");
$stateProvider.state("landing", {
templateUrl : "screens/landing/landingTemplate.html",
url: "/landing",
controller : "landingController"
}).state("csr_view_sub", {
templateUrl : "screens/csr/home/csr_viewSubscriberTemplate.html",
url: "/csr_view",
controller : "csrController"
}).state("pm_view_report", {
templateUrl : "screens/manager/reports/pm_viewReportsTemplate.html",
url: "/view_report",
controller : "pm_viewReportsController"
}).state("award_config", {
templateUrl : "screens/manager/award_config/award_ConfigTemplate.html",
url: "/award_config",
controller : "awardConfigController"
}).state("create_user", {
templateUrl : "screens/manager/user/createUser.html",
url: "/create_user",
controller : "createUserController",
}).state("groups", {
templateUrl : "screens/manager/groups/group.html",
url: "/groups",
controller : "groupController"
});
});
Удивительно, но все остальные парциальные компоненты загружаются нормально, кроме /create_user
.Если это поможет, я получаю ошибки transition superseeded
transition aborted
и еще 2 каждый раз, когда я перезагружаю /create_user
.Я не получаю это после обновления версии ui-router, но функционально, но ui-view пуст для /create_user
.
Ошибка: -
angular.js:14800 Error: transition superseded
at $StateProvider.$get (angular-ui-router.js:2866)
at Object.invoke (angular.js:5106)
at angular.js:4893
at getService (angular.js:5047)
at injectionArgs (angular.js:5072)
at Object.invoke (angular.js:5098)
at angular.js:8267
at forEach (angular.js:408)
at Object.<anonymous> (angular.js:8265)
at Object.invoke (angular.js:5106) "Possibly unhandled rejection: {}"
(anonymous) @ angular.js:14800
(anonymous) @ angular.js:11218
processChecks @ angular.js:17199
$digest @ angular.js:18352
$apply @ angular.js:18649
bootstrapApply @ angular.js:1958
invoke @ angular.js:5106
doBootstrap @ angular.js:1956
bootstrap @ angular.js:1976
angularInit @ angular.js:1861
(anonymous) @ angular.js:34354
fire @ jquery-1.12.4.js:3232
fireWith @ jquery-1.12.4.js:3362
ready @ jquery-1.12.4.js:3582
completed @ jquery-1.12.4.js:3617
angular.js:14800 Error: transition prevented
at $StateProvider.$get (angular-ui-router.js:2867)
at Object.invoke (angular.js:5106)
at angular.js:4893
at getService (angular.js:5047)
at injectionArgs (angular.js:5072)
at Object.invoke (angular.js:5098)
at angular.js:8267
at forEach (angular.js:408)
at Object.<anonymous> (angular.js:8265)
at Object.invoke (angular.js:5106) "Possibly unhandled rejection: {}"
(anonymous) @ angular.js:14800
(anonymous) @ angular.js:11218
processChecks @ angular.js:17199
$digest @ angular.js:18352
$apply @ angular.js:18649
bootstrapApply @ angular.js:1958
invoke @ angular.js:5106
doBootstrap @ angular.js:1956
bootstrap @ angular.js:1976
angularInit @ angular.js:1861
(anonymous) @ angular.js:34354
fire @ jquery-1.12.4.js:3232
fireWith @ jquery-1.12.4.js:3362
ready @ jquery-1.12.4.js:3582
completed @ jquery-1.12.4.js:3617
angular.js:14800 Error: transition aborted
at $StateProvider.$get (angular-ui-router.js:2868)
at Object.invoke (angular.js:5106)
at angular.js:4893
at getService (angular.js:5047)
at injectionArgs (angular.js:5072)
at Object.invoke (angular.js:5098)
at angular.js:8267
at forEach (angular.js:408)
at Object.<anonymous> (angular.js:8265)
at Object.invoke (angular.js:5106) "Possibly unhandled rejection: {}"
(anonymous) @ angular.js:14800
(anonymous) @ angular.js:11218
processChecks @ angular.js:17199
$digest @ angular.js:18352
$apply @ angular.js:18649
bootstrapApply @ angular.js:1958
invoke @ angular.js:5106
doBootstrap @ angular.js:1956
bootstrap @ angular.js:1976
angularInit @ angular.js:1861
(anonymous) @ angular.js:34354
fire @ jquery-1.12.4.js:3232
fireWith @ jquery-1.12.4.js:3362
ready @ jquery-1.12.4.js:3582
completed @ jquery-1.12.4.js:3617
angular.js:14800 Error: transition failed
at $StateProvider.$get (angular-ui-router.js:2869)
at Object.invoke (angular.js:5106)
at angular.js:4893
at getService (angular.js:5047)
at injectionArgs (angular.js:5072)
at Object.invoke (angular.js:5098)
at angular.js:8267
at forEach (angular.js:408)
at Object.<anonymous> (angular.js:8265)
at Object.invoke (angular.js:5106) "Possibly unhandled rejection: {}"
(anonymous) @ angular.js:14800
(anonymous) @ angular.js:11218
processChecks @ angular.js:17199
$digest @ angular.js:18352
$apply @ angular.js:18649
bootstrapApply @ angular.js:1958
invoke @ angular.js:5106
doBootstrap @ angular.js:1956
bootstrap @ angular.js:1976
angularInit @ angular.js:1861
(anonymous) @ angular.js:34354
fire @ jquery-1.12.4.js:3232
fireWith @ jquery-1.12.4.js:3362
ready @ jquery-1.12.4.js:3582
completed @ jquery-1.12.4.js:3617