Matt Bryson
Matt Bryson

Reputation: 2944

Angular5 ng-bootstrap - how to use just the ngb-panel

How can you render just a Panel outside of an accordion ?

This does not render anything...

 <ngb-panel title="Login">
  <ng-template ngbPanelContent>
    Hello
  </ng-template>
 </ngb-panel>

But this does (with collapsable accordion behaviour - which I dont want...)

<ngb-accordion #acc="ngbAccordion" activeIds="ngb-panel-0">
 <ngb-panel title="Login">
  <ng-template ngbPanelContent>
    Hello
  </ng-template>
 </ngb-panel>
</ngb-accordion>

Upvotes: 3

Views: 7088

Answers (1)

Martin Parenteau
Martin Parenteau

Reputation: 73761

According to the Bootstrap 4 documentation, the Panel component has been replaced by the Card component, which is not included in ng-bootstrap because it is obtained simply by styling with CSS selectors.

For those who are interested in having a collapsible container outside of the Accordion, they can use ng-bootstrap's Collapse component.

Upvotes: 2

Related Questions