Help with carrousel implementation

UI Components for Angular
Post Reply
mxrty
Posts: 1
Joined: 05 May 2021, 18:15

05 May 2021, 18:22

Hi, im trying to use ngprime carrousel component in my project for the first time and is not working well. I think the problem should be relationated with styles but i check everyhing and i think its okay i ll let you some images
this is how it look likes :
Image

PhilHuhn
Posts: 177
Joined: 19 Sep 2018, 02:52
Location: Ann Arbor, Michigan USA
Contact:

09 May 2021, 03:33

Hey: Not much to go on. How's about the HTML code at least. This is what I did:

Code: Select all

<p-carousel [value]="data">
  <ng-template let-d pTemplate="item">
    <div>Part: {{d.id}}</div>
    <div>{{d.name}}</div>
    <div>Available: {{d.cnt}}</div>
  </ng-template>
</p-carousel>
Code

Code: Select all

  data: any[] = [];
  //
  ngOnInit(): void {
    this.data = [
      {id: 10001, name: 'Item 10001', cnt: 5 },
      {id: 10002, name: 'Item 10002', cnt: 7 },
      {id: 10003, name: 'Item 10003', cnt: 6 },
      {id: 10004, name: 'Item 10004', cnt: 11 },
      {id: 10005, name: 'Item 10005', cnt: 1 },
    ];
  }

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests