ngb-accordion or ngb-panel do not appear

First and most importantly Check if the third party import is correct and the import is in the right module

Either import NgbModule or NgbAccordionModule

import { NgbAccordionModule } from '@ng-bootstrap/ng-bootstrap';

...
import: [
     NgbAccordionModule
]
...

Basic code for the ngb-accordion:

<ngb-accordion activeIds="test-panel">
  <ngb-panel title="Accordion Panel 1" id="test-panel">
    <ng-template ngbPanelContent>
      This is accordion panel content
    </ng-template>
  </ngb-panel>
</ngb-accordion>

Refer here for examples: https://ng-bootstrap.github.io/#/components/accordion/examples

Published by Akhouri Vishal Sinha

Software Developer, Author and Blogger

Leave a comment