Javascript 角度-下一个选项卡按钮
将此用作构建我的选项卡的基础 目前正在尝试实现“继续”和“返回”选项卡按钮,而不是直接单击您希望访问的按钮 我想知道是否有可能实现Javascript 角度-下一个选项卡按钮,javascript,angularjs,tabs,Javascript,Angularjs,Tabs,将此用作构建我的选项卡的基础 目前正在尝试实现“继续”和“返回”选项卡按钮,而不是直接单击您希望访问的按钮 我想知道是否有可能实现 $scope.nextButton = function(tab) { $scope.currentTab = $scope.tabs[tab].next.url } 我希望放置下一个按钮的位置将不在 ng-repeat='tab in tabs' 不确定如何通过当前选项卡 我们将一如既往地感谢您的帮助。您可以在下面的小提琴中找到一个例子: 你可以继
$scope.nextButton = function(tab) {
$scope.currentTab = $scope.tabs[tab].next.url
}
我希望放置下一个按钮的位置将不在
ng-repeat='tab in tabs'
不确定如何通过当前选项卡
我们将一如既往地感谢您的帮助。您可以在下面的小提琴中找到一个例子: 你可以继续改进,但你明白了
$scope.history = {};
$scope.history.tabs = [];
$scope.history.tabs.push($scope.currentTab);
$scope.history.index = 0;
$scope.history.maxIndex = 0;
$scope.previous = function() {
if ($scope.history.index <= 0)
return;
$scope.history.index--;
$scope.currentTab = $scope.history.tabs[$scope.history.index];
};
$scope.next = function() {
if ($scope.history.index === $scope.history.maxIndex)
return;
$scope.history.index++;
$scope.currentTab = $scope.history.tabs[$scope.history.index];
};
$scope.history={};
$scope.history.tabs=[];
$scope.history.tabs.push($scope.currentTab);
$scope.history.index=0;
$scope.history.maxIndex=0;
$scope.previous=函数(){
如果($scope.history.index
$scope.history = {};
$scope.history.tabs = [];
$scope.history.tabs.push($scope.currentTab);
$scope.history.index = 0;
$scope.history.maxIndex = 0;
$scope.previous = function() {
if ($scope.history.index <= 0)
return;
$scope.history.index--;
$scope.currentTab = $scope.history.tabs[$scope.history.index];
};
$scope.next = function() {
if ($scope.history.index === $scope.history.maxIndex)
return;
$scope.history.index++;
$scope.currentTab = $scope.history.tabs[$scope.history.index];
};