0

I am using the tabset component of ng-bootstrap for my angular project and I am wondering if it's possible to navigate through the different tabs of my ngb-tabset by using the keyboard keys (i.e. "alt" key or "alt"+"n" keys)?

My code looks like:

<ngb-tabset>
  <ngb-tab title="Tab 1">
    <ng-template ngbTabContent>
      Some Content
    </ng-template>
  </ngb-tab>
  <ngb-tab title="Tab 2">
    <ng-template ngbTabContent>
Some Content
    </ng-template>
  </ngb-tab>
  <ngb-tab title="Tab 3">
    <ng-template ngbTabContent>
      Some Content
    </ng-template>
  </ngb-tab>
</ngb-tabset>
Moritz
  • 33
  • 5
  • There's a method `select` in the https://ng-bootstrap.github.io/#/components/tabset/api. Maybe you can code an keypress event handler that selects the next tab, with this method. Show us your attempt. – Zak Feb 20 '19 at 10:35
  • Here's a little help for handling keypress events : https://stackoverflow.com/questions/37362488/how-can-i-listen-for-keypress-event-on-the-whole-page – Zak Feb 20 '19 at 10:42

0 Answers0