0
<div id="displayCarousel" class="carousel slide carousel-fade" data-ride="carousel">
    <div class="carousel-inner" role="listbox">
    <div class="carousel-item" ng-class="{active:!$index}" ng-repeat="pics in advertimages">
    <div class="view">
                <span ng-repeat="x in pics.files">
                 <img ng-src="img/my_adverts/{{x}}" class="d-block w-100" alt="image">
               </span>
               <div class="mask rgba-black-light"></div>


    </div>
    <div class="carousel-caption">
    <h3 class="h3-responsive">From:</h3>
                <p>@{{pics.username}}</p>

    </div>

    </div>

    </div>

    <a class="carousel-control-prev" href="#displayCarousel" role="button" data-slide="prev">
        <span class="carousel-control-prev-icon" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
    </a>
    <a class="carousel-control-next" href="#displayCarousel" role="button" data-slide="next">
        <span class="carousel-control-next-icon" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
    </a>

</div>

$scope.advertimages is an array from the database, the array contains a column called files which is also an array. The problem I have with this is that if the files of a particular row in $scope.advertimages contains more than one image, then all the images in that row will display on a single page of the carousel.

Let me explain better. Let's assume the column 'files' of the first row of advertimages has a single image. Then the column 'files'of the second row of advertimages has three images. The single image of the first row will take a single page of the carousel, which is what I want but the problem I have is that: the three Images of the second row will be on a single page of the carousel. What I want is that: the three images of the second row should also be on different pages of the carousel.

atomty
  • 187
  • 2
  • 16
  • For each row of asvertimages array, You want only the first image from files to appear on the carousel? – Akber Iqbal Jan 05 '19 at 02:00
  • Let me explain better. Let's assume the column 'files' of the first row of advertimages has a single image. Then the column 'files'of the second row of advertimages has three images. The single image of the first row will take a single page of the carousel, which is what I want but the problem I have is that: the three Images of the second row will be on a single page of the carousel. What I want is that: the three images of the second row should also be on different pages of the carousel. – atomty Jan 05 '19 at 09:19

0 Answers0