Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

510
Views
Angular using carousel with *ngfor

I am trying to make a carousel. This carousel image gets its imagepath string from a string array. when i click left or right arrow I want it to increase or decrease index, so i can change image which is shown. how can i mak this happen. NO ts code allowed, only html can be used.

 <div id="carouselExampleControls" class="carousel slide" data-bs-ride="carousel">
      <div class="carousel-inner">               
        <ul  *ngFor="let carImagePath of carImagePaths; let i= index;first as isFirst">
          <div [ngClass]="isFirst ? 'carousel-item active' : 'carousel-item' "> 
            <li><img [src]="imageUrl+carImagePath" class="d-block w-100" alt="..."></li> 
          </div>
        </ul> 
        </div>
          <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="prev">
            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
            <span class="visually-hidden">Previous</span>
          </button>
          <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="next">
            <span class="carousel-control-next-icon" aria-hidden="true"></span>
            <span class="visually-hidden">Next</span>
          </button>
      </div>
 </div>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

As a solution i gave up trying to use normal bootstrap carousel. I tried angular bootstrap carousel. ng add ngx-bootstrap --component carousel . intallled this to terminal. and used it own html from via this site: https://valor-software.com/ngx-bootstrap/#/components/carousel?tab=overview

Now it is working.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!