この子NAV-バーのためにタグ付けされ
<ion-nav-bar class="bar-light">
<ion-nav-buttons side="left">
<i class="button button-clear button-positive icon ion-android-arrow-back" ng-click="goParent();"></i>
</ion-nav-buttons>
<ion-nav-buttons side="right">
<button type="submit" class="button button-positive button-clear icon ion-arrow-up-b" ng-click="goPrevious()"></button>
</ion-nav-buttons>
<ion-nav-buttons side="secondary">
<button type="submit"class="button button-positive button-clear icon ion-arrow-down-b" ng-click="goNext()"></button>
</ion-nav-buttons>
</ion-nav-bar>
これはapp.js
.state('parent', {
url: '/parent',
templateUrl: 'templates/parent.html',
controller: 'ParentCtrl'
})
.state('parent-child', {
url: '/parent/child/:mailSerialNumber',
templateUrl: 'templates/parent-child.html',
controller: 'ChildCtrl'
})
これは
.controller('ChildCtrl', function ($stateParams, $location, $scope) {
$scope.URL = {};
$scope.URL.Parent = "parent"
$scope.goParent = function() {
$location.url($scope.URL.Parent);
};
$scope.Previous = $stateParams.mailSerialNumber - 1;
$scope.URL.Previous = "parent/child/" + $scope.Previous;
$scope.goPrevious = function() {
$location.url($scope.URL.Previous);
};
$scope.Next = $stateParams.mailSerialNumber + 1;
$scope.URL.Next = "parent/child/" + $scope.Next;
$scope.goNext = function() {
$location.url($scope.URL.Next);
};
})
ありがとうございました。しかし、質問はイオン2です。 –