title: data-toggle is not working in angular 4
body: <p>I am trying to use the data-toggle functionality to collapse and expand the menu items in the nav bar when the size is medium.   Below is the code I tried to achieve that functionality, but it is not working. </p>
  
  <pre><code>&lt;div class="container-fluid"&gt;
          &lt;div class='row' style='background-color: tomato; padding: 5px'&gt;
            &lt;div class='col-md-12'&gt;
              &lt;app-main-heading&gt;&lt;/app-main-heading&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="row"&gt;
            &lt;div class='col-md-12'&gt;
              &lt;nav class='navbar navbar-expand-sm bg-dark navbar-dark'&gt;
                &lt;a href='#'&gt;&lt;/a&gt;
                &lt;button class="navbar-toggler collapsed" type="button" data-toggle="collapse" data-target="#collapsibleNavbar" aria-expanded="false"
                  aria-controls="navbar"&gt;
                  &lt;span class="navbar-toggler-icon"&gt;&lt;/span&gt;
                &lt;/button&gt;
                &lt;div class="collapse navbar-collapse" id="collapsibleNavbar"&gt;
                  &lt;ul class="navbar-nav"&gt;
                    &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link" routerLink="/firstmenu"&gt;FirstMenu&lt;/a&gt;
                    &lt;/li&gt;
                    &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link" routerLink="/secondmenu"&gt;SecondMenu&lt;/a&gt;
                    &lt;/li&gt;
                    &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link" routerLink="/thirdmenu"&gt;ThirdMenu&lt;/a&gt;
                    &lt;/li&gt;
                  &lt;/ul&gt;
                &lt;/div&gt;
              &lt;/nav&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class='row'&gt;
            &lt;router-outlet&gt;&lt;/router-outlet&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  </code></pre>
  
  <p>I am not able to collapse and expand when I click on the toggle-button on the nav-bar.</p>
  
  <p>Can anyone please help me where I am doing wrong.</p>