Matteo Scandolo | 46b5610 | 2015-12-16 14:23:08 -0800 | [diff] [blame] | 1 | angular.module('ui.bootstrap.demo').controller('CarouselDemoCtrl', function ($scope) { |
| 2 | $scope.myInterval = 5000; |
| 3 | $scope.noWrapSlides = false; |
| 4 | var slides = $scope.slides = []; |
| 5 | $scope.addSlide = function() { |
| 6 | var newWidth = 600 + slides.length + 1; |
| 7 | slides.push({ |
| 8 | image: '//placekitten.com/' + newWidth + '/300', |
| 9 | text: ['More','Extra','Lots of','Surplus'][slides.length % 4] + ' ' + |
| 10 | ['Cats', 'Kittys', 'Felines', 'Cutes'][slides.length % 4] |
| 11 | }); |
| 12 | }; |
| 13 | for (var i=0; i<4; i++) { |
| 14 | $scope.addSlide(); |
| 15 | } |
| 16 | }); |