carousel diferent height for carousel items

UI Components for Angular
Post Reply
retarderko
Posts: 2
Joined: 26 Jun 2021, 19:33

05 Aug 2021, 12:11

Hi im using primeng carousel but there is problem so carousel height is always based on the highest item. I want to have automatic height for every carousel item.

Is this possible?

Code: Select all

 <p-carousel [value]="post.content" [numVisible]="1" [numScroll]="1" [circular]="true">
    <ng-template let-content pTemplate="item">
      <video *ngIf="content.contentType===ContentType.VIDEO" class="video" width="100%" height="auto" playsinline controls controlsList="nodownload" >
        <source [src]="getContentLink(post.user.id,post.id,content.fileName)" type="video/mp4">
      </video>
      <img height="auto" width="100%" *ngIf="content.contentType===ContentType.PHOTO" [src]="getContentLink(post.user.id,post.id,content.fileName)"/>
    </ng-template>
  </p-carousel>
Image

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 15 guests