[英]Using $state methods with $stateChangeStart toState and fromState in Angular ui-router
[英]AngularJS UI-Router: “toState.$$state is not a function”
堆棧跟蹤:
TypeError: toState.$$state is not a function
at ct-ui-router-extras.dsr.js:141
at Object.forEach (angular.js:350)
at ct-ui-router-extras.dsr.js:137
at Scope.$get.Scope.$broadcast (angular.js:16238)
at $state.transitionTo.$state.transition.resolved.then.$state.transition (angular-ui-router.js:3311)
at processQueue (angular.js:14634)
at angular.js:14650
at Scope.$get.Scope.$eval (angular.js:15916)
at Scope.$get.Scope.$digest (angular.js:15727)
at Scope.$get.Scope.$apply (angular.js:16024)
(anonymous function) @ angular.js:12416
$get @ angular.js:9203
$get.Scope.$broadcast @ angular.js:16240
$state.transitionTo.$state.transition.resolved.then.$state.transition @ angular-ui-router.js:3311
processQueue @ angular.js:14634
(anonymous function) @ angular.js:14650
$get.Scope.$eval @ angular.js:15916
$get.Scope.$digest @ angular.js:15727
$get.Scope.$apply @ angular.js:16024
bootstrapApply @ angular.js:1658
invoke @ angular.js:4473
doBootstrap @ angular.js:1656
bootstrap @ angular.js:1676
angularInit @ angular.js:1570
(anonymous function) @ angular.js:28599
jQuery.Callbacks.fire @ jquery.js:3099
jQuery.Callbacks.self.fireWith @ jquery.js:3211
jQuery.extend.ready @ jquery.js:3417
completed @ jquery.js:3433
通過初步研究,我認為這是由於某種版本沖突引起的,但是將我的所有bower.json
依賴關系更新為最新版本並不能解決問題(甚至可能是問題的起因,但我無法查明原因)哪些程序包交互不良)。
{
"devDependencies": {
"angular-mocks": "latest"
},
"dependencies": {
"angular": "latest",
"bootstrap": "3.x",
"angular-bootstrap": "latest",
"angular-ui-router": "latest",
"ui-router-extras": "latest",
"angular-moment": "latest",
"angular-daterangepicker": "latest",
"ng-jcrop": "latest",
"ngGAPI": "https://github.com/christiansmith/ngGAPI.git",
"angular-permission": "latest",
"angular-ui-calendar": "latest"
},
"resolutions": {
"angular": ">=1.0.8",
"isotope": "~2.1.1",
"fullcalendar": "~2.3.2",
"outlayer": "^1.2.0"
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.