all files / app/main/components/material-docs/demo-partials/tabs/demoStaticTabs/ script.js

37.5% Statements 3/8
100% Branches 0/0
25% Functions 1/4
37.5% Lines 3/8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23                                        
(function () {
  'use strict';
 
  angular
      .module('tabsDemoStaticTabs', ['ngMaterial'] )
      .controller('AppCtrl', AppCtrl);
 
  function AppCtrl ( $scope ) {
    $scope.data = {
      selectedIndex: 0,
      secondLocked:  true,
      secondLabel:   "Item Two",
      bottom:        false
    };
    $scope.next = function() {
      $scope.data.selectedIndex = Math.min($scope.data.selectedIndex + 1, 2) ;
    };
    $scope.previous = function() {
      $scope.data.selectedIndex = Math.max($scope.data.selectedIndex - 1, 0);
    };
  }
})();