title: Dropdown not working first time after login when redirecting to home page
body: <p>I am new on Angular 4 and with my current code, I am able to redirect to the homepage after login. However, the dropdown of my homepage is not working correctly. Note that when I refresh home page again then it is working fine.</p>
  
  <p>example code : it is simple bootstrap dropdown toggle.</p>
  
  <pre><code>&lt;li&gt;
      &lt;a class="dropdown-toggle" data-toggle="dropdown"&gt;
        &lt;i class="menu-icon fa fa-pencil-square-o"&gt;&lt;/i&gt;
        &lt;span class="menu-text"&gt; Entity &lt;/span&gt;
  
        &lt;b class="arrow fa fa-angle-down"&gt;&lt;/b&gt;
      &lt;/a&gt;
  
      &lt;b class="arrow"&gt;&lt;/b&gt;
  
      &lt;ul class="submenu nav-hide" style="display: none;"&gt;
        &lt;li class=""&gt;
          &lt;a [routerLink]="['broker','activeBrokerList']"&gt;
            &lt;i class="menu-icon fa fa-caret-right"&gt;&lt;/i&gt;
            Broker
          &lt;/a&gt;
  
          &lt;b class="arrow"&gt;&lt;/b&gt;
        &lt;/li&gt;
  
        &lt;li class=""&gt;
          &lt;a [routerLink]="['supplier','activeSupplierList']"&gt;
            &lt;i class="menu-icon fa fa-caret-right"&gt;&lt;/i&gt;
            Supplier
          &lt;/a&gt;
  
          &lt;b class="arrow"&gt;&lt;/b&gt;
        &lt;/li&gt;
  
        &lt;li class=""&gt;
          &lt;a [routerLink]="['customer','activeCustomerList']"&gt;
            &lt;i class="menu-icon fa fa-caret-right"&gt;&lt;/i&gt;
            Customer
          &lt;/a&gt;
  
          &lt;b class="arrow"&gt;&lt;/b&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
  </code></pre>
  
  <hr>
  
  <p>Thanks.</p>
  
  <hr>