Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 试图改变。状态与离子';s`on swip right`方法。陷入错误_Angularjs_Ionic Framework_Angular Ui Router_Ionic - Fatal编程技术网

Angularjs 试图改变。状态与离子';s`on swip right`方法。陷入错误

Angularjs 试图改变。状态与离子';s`on swip right`方法。陷入错误,angularjs,ionic-framework,angular-ui-router,ionic,Angularjs,Ionic Framework,Angular Ui Router,Ionic,请原谅,我已经花了3个小时左右的时间试图解决这个问题。我已经决定不传递参数,只是简单地滑动到一个新的状态而不传递参数,只是为了完成它,但没有运气 错误。 错误:无法从状态“app.today”解析“app.current trip.html” 在Object.transitiono 开启刷卡功能所在的trip details.html模式 向右滑动开始行程 应用程序功能逻辑所在的BookingsController.js angular.module('starter') .controlle

请原谅,我已经花了3个小时左右的时间试图解决这个问题。我已经决定不传递参数,只是简单地滑动到一个新的状态而不传递参数,只是为了完成它,但没有运气

错误。

错误:无法从状态“app.today”解析“app.current trip.html” 在Object.transitiono

开启刷卡功能所在的trip details.html模式

向右滑动开始行程

应用程序功能逻辑所在的BookingsController.js

angular.module('starter')
 .controller("BookingsCtrl", function($scope, $stateParams, $state, $ionicModal, BookingsService, driverLocationService) {

$scope.onSwipeRight = function() {
  $state.go('app.current-trip.html');
}
app.js中的状态路由

.state('app.today', {
    url: '/today/:user_id/:driver_id',
    views: {
        'menuContent': {
          templateUrl: 'templates/today.html',
          controller: 'BookingsCtrl'
        }
      }
    })

 .state('app.trip-details', {
    url: '/trip-details',
    views: {
      'menuContent': {
        templateUrl: 'templates/trip-details.html',
        controller: 'BookingsCtrl'
      }
    }
  })

  .state('app.current-trip', {
    url: '/current-trip',
    views: {
      'menuContent': {
        templateUrl: 'templates/current-trip.html',
        controller: 'BookingsCtrl'
      }
    }
  })

current-trip.html是一个模态是否重要?而不是实际视图?

使用状态名称,而不是模板文件名。尝试:

$state.go('app.current-trip');