'use strict';

angular.module('app').controller('CarouselController', ['$scope', '$state', function($scope, $state) {
    $scope.myInterval = 5000;
    $scope.noWrapSlides = false;
    $scope.active = 0;
    $scope.slides = [];
    var currIndex = 0;
    $scope.addSlide = function() {
        var tag = $scope.slides.length + 1;
        $scope.slides.push({
            image: $state.current.data.imgDir + tag + '.jpg',
            id: currIndex++
        });
    };
    for (var i = 1; i < $state.current.data.count + 1; i++) {
        $scope.addSlide();
    }
}]);