Topic: Documentation on Tabs incomplete (Angular)
Benny Bottema pro asked 7 years ago
On the page about Tabs Components, the events on per-tab basis are missing:
<mdb-tabset #staticTabs [buttonClass]="'nav-tabs tabs-3 red'" [contentClass]="'card'" (showBsTab)="show($event)" (shownBsTab)="shown($event)" (hideBsTab)="hide($event)" (hiddenBsTab)="hidden($event)">
<!--Panel 1-->
<mdb-tab heading="Profile" (select)="onSelectProfile($event)">
(...)
</mdb-tab>
<!--Panel 2-->
<mdb-tab heading="Follow" (select)="onSelectFollow($event)">
(...)
</mdb-tab>
</mdb-tabset>
Also to programmatically activate a tab:
import { Component } from '@angular/core';
@Component({
selector: 'tabs-component-example',
templateUrl: 'tabs.component.html',
})
export class TabsComponent {
@ViewChild('staticTabs') public staticTabs;
selectProfileTab() {
this.staticTabs.setActiveTab(1);
}
selectFollowTab() {
this.staticTabs.setActiveTab(2);
}
}
Damian Gemza staff answered 7 years ago
Closed
This topic is closed.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Closed
- User: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No