简体   繁体   中英

<nb-tab> How to call a user defined function in nebular nb-tab while switching tabs

(changeTab) isn't working for me. I want to call a specific function when I switch to a specific tab in Nebular Theme in Angular.

Not easy to give to help because you did not provide any examples of our code. At this stage i'm mostly guessing but you should figure out why (changeTab) does not work.

Make sure you apply the (changeTab) on the <nb-tabset> tag rather than the <nb-tab> tag.

<nb-tabset (changeTab)="yourFunc($event)">
    <nb-tab tabTitle="some title">
        <!--Tab content goes here-->
    </nb-tab>
<nb-tabset>

Works perfectly fine for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM