这是解决方案!
只需使用:
$ionicHistory.nextViewOptions({ disableBack: true });登录功能示例:
$scope.login = function () {Security.login($scope.cred.email, $scope.cred.password) .success(function(data) { Security.setUser(data.data[0]); $ionicHistory.nextViewOptions({ disableBack: true }); $state.go('posts', {}, {location: "replace", reload: true}); }).error(function(data) { $scope.showalert(); });};


