title: angular 9 and collapsible bootstrap menu
body: <p>I have a bootstrap 4 collapsible menu (in angular 9), when i resize i get the hamburger as planned. When i click on it it expands, but when i click on it again it will not fold back in, you see it quickly flash, but it wont stay folded in.</p>
  
  <p>I already looked at the answers here but they do not seem to solve the issue.  As far as i can see i have not loaded the bootstrap twice, that was my 1st thought. Next  i took the lines to load it from the cdn network from bootstrap itself again, just in case and i also tried varying the order in which the scripts were loaded.</p>
  
  <p>None of this worked. </p>
  
  <p>The code to create the collapsible menu us also straight from bootstrap itself. No doubt something silly but i cant see it.</p>
  
  <p>My html code is:</p>
  
  <pre><code>&lt;nav class="navbar navbar-expand-lg navbar-light"&gt;
  
        &lt;button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation"&gt;
          &lt;span class="line"&gt;&lt;/span&gt; 
          &lt;span class="line"&gt;&lt;/span&gt; 
          &lt;span class="line" style="margin-bottom: 0;"&gt;&lt;/span&gt;
  &lt;/button&gt;
  
       &lt;div class="collapse navbar-collapse" id="navbarNavDropdown"&gt;
          &lt;ul class="navbar-nav"&gt;
            &lt;li class="nav-item"&gt;
              &lt;a class="nav-link nav-link-color" [routerLink]="['./']"&gt;Home&lt;/a&gt;
            &lt;/li&gt;
            &lt;li class="nav-item"&gt;
              &lt;a class="nav-link nav-link-color" [routerLink]="['./visitor/about-us']"&gt;About Us&lt;/a&gt;
            &lt;/li&gt;
            &lt;li class="nav-item"&gt;
              &lt;a class="nav-link nav-link-color" [routerLink]="['./visitor/contact-us']"&gt;Contact us&lt;/a&gt;
            &lt;/li&gt;
            &lt;/ul&gt;
  </code></pre>
  
  <p>Any ideas are much appreciated.</p>
  
  <p>PS: NO errors in console</p>