title: How to close other panels when another one is opened in ng-bootstrap
body: <p>I want to close all the collapse panel in my sidebar except the panel I clicked. I'm trying to achieve this behavior with ng-bootstrap collapse panel.</p>
  
  <p>Example Code: </p>
  
  <pre><code>&lt;ul class="sidebar"&gt;
      &lt;li class="nav-item"&gt;
          &lt;a class="nav-link" (click)="isCollapsed = !isCollapsed" [attr.aria-expanded]="!isCollapsed" aria-controls="collapse_1"&gt;Collapse1&lt;/a&gt;
          &lt;div class="collapse" id="collapse_1" [ngbCollapse]="isCollapsed"&gt;
              &lt;ul class="nav"&gt;
                  &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link"&gt;Accordion&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link"&gt;Buttons&lt;/a&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/li&gt;
      &lt;li class="nav-item"&gt;
          &lt;a class="nav-link" (click)="isCollapsed = !isCollapsed" [attr.aria-expanded]="!isCollapsed" aria-controls="collapse_2"&gt;Collapse2&lt;/a&gt;
          &lt;div class="collapse" id="collapse_2" [ngbCollapse]="isCollapsed"&gt;
              &lt;ul class="nav"&gt;
                  &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link"&gt;Accordion&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link"&gt;Buttons&lt;/a&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>