ngb-accordion : Click event for ngb-panel to call component method?

Please remember, the issues forum is NOT for support requests. It is for bugs and feature requests only.
Please read and search
existing issues (both open and closed) prior to opening any new issue and ensure you follow the instructions therein.

Bug description:

Link to minimally-working plunker that reproduces the issue:

Version of Angular, ng-bootstrap, and Bootstrap:




2 thoughts on “ngb-accordion : Click event for ngb-panel to call component method?

  1. I am using ngb-accordion and when I click on ngb-panel I need to call method in component, do we have that feature?
    <ngb-panel (click)="comMethod()">
    I did not find anything related this in documentation.

  2. To be more specific, and probably a bit more helpful for anyone looking for an answer:

    <ngb-accordion (panelChange)="toggleAccordian($event)">

    public toggleAccordian( props:NgbPanelChangeEvent ): void{
       props.nextState // true === panel is toggling to an open state 
                                  // false === panel is toggling to a closed state
       props.panelId    // the ID of the panel that was clicked
       props.preventDefault(); // don't toggle the state of the selected panel