1 possible answer(s) on “ngCarousel: need info (non on internet) on how to call select()

  1. You need to:

    • export the carousel component as a variable in a template, ex.: <ngb-carousel #myCarousel="ngbCarousel">
    • give slides you want to select id, ex.: <ng-template ngbSlide id="mySecondSlide">
    • select a desired slide by using the exported carousel instance and slide id, ex.: <button (click)="myCarousel.select('mySecondSlide')">Select second slide</button>

    Here is a working plunker: http://plnkr.co/edit/mS0phEdxnBJMzyfkKoiZ?p=preview

    All those things are either documented on https://ng-bootstrap.github.io/#/components/carousel or a basic Angular constructs. As this is a support request, please don’t open those here on GitHub but use an appropriate support channel instead: https://github.com/ng-bootstrap/ng-bootstrap#getting-help