版本:angular v1.6.4, ui-router v1.0.5;angular.module('beeApp').controller('messageListCtrl', ['$scope','$state', function ($scope,$state) { $scope.DetailFlag = false; $scope.back = function (e){ $state.go(-1); // history.go(-1); } $scope.showDetail = function (item){ $scope.DetailFlag = true; } $scope.hideDetail = function (){ $scope.DetailFlag = false; }}])上面的代码中,state.go(−1)不会回退,不会跳转,没有反应,使用原生history.go(−1)正常;请问state.go()为什么无效?
添加回答
举报
0/150
提交
取消