Get selected item in TabView

UI Components for Angular
Post Reply
angulardev
Posts: 2
Joined: 14 Sep 2020, 15:51

21 Sep 2020, 09:18

Hi,
I have a tab view as follows. Using the below code i can get only the selected index in the component. How can I get the selected item in the component.

<p-tabView styleClass="tabview-custom" (onChange)="handleChange($event)">
<p-tabPanel *ngFor="let item of customerStatusCounts; let i = index" [selected]="i == 1">
<ng-template pTemplate="header">
<div class="custom">
<div class="col-3 contact-icon-div">
<img src="assets/images/{{item.icon}}" alt="">
</div>
<div class="col-9 contact-text-div">
<p class="contact-count">{{item.count}}</p>
<p class="contact-text">{{item.label}}</p>
</div>
</div>
</ng-template>
</p-tabPanel>
</p-tabView>


Thanks.
Dev

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 32 guests