'use strict';

angular.module('app').controller('TabController', ['$scope', '$state', '$timeout', function($scope, $state, $timeout) {
    //定时显示
    // $timeout(function() {
    //     $state.go('tabview.iPhone');
    // }, 10000);

    $scope.isActive = $state.$current.name == 'tabview.iPhone' ? true : false;
    $scope.$on('$stateChangeStart',
        function(event, toState, toParams, fromState, fromParams, options) {
            $scope.isActive = toState.name == 'tabview.iPhone' ? true : false;
        });

    // $(function () {
    //     $("#tag span").click(function () {
    //         $("#tag span").eq($(this).index()).addClass("navdown").siblings().removeClass("navdown");
    //     })
    // })
}]);