1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

How to programmatically select a angular bootstrap nav tab from a component class

Discussão em 'Angular' iniciado por Nenad Dordevic, Setembro 10, 2024.

  1. Hi how can I obtain a reference to a ngbNav ng-bootstrap component in my component class so I can select some tab programmatically? This doesnt work:

    @ViewChild('nav') nav? : ElementRef<NgbNav>;


    In my html template I have:

    <ul ngbNav #nav="ngbNav" [(activeId)]="active" (navChange)="onNavChange($event)" class="nav-tabs">

    Continue reading...

Compartilhe esta Página