kmkatsma / angular2-webpack-starter-gentelella

Updated angular2-webpack-starter modified to support the open source gentelella theme
149 stars 96 forks source link

Bootstrap dropdown not showing up #3

Closed gharia closed 5 years ago

gharia commented 7 years ago

Following code seems correct in topnavbar.component.html, but the dropdown is not showing up when you click on user's profile pic on top right corner

<li class="">
                  <a href="javascript:;" class="user-profile dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                    <img src="assets/img/img.jpg" alt="">John Doe
                    <span class=" fa fa-angle-down"></span>
                  </a>
                  <ul class="dropdown-menu dropdown-usermenu pull-right">
                    <li><a href="javascript:;"> Profile</a></li>
                    <li>
                      <a href="javascript:;">
                        <span class="badge bg-red pull-right">50%</span>
                        <span>Settings</span>
                      </a>
                    </li>
                    <li><a href="javascript:;">Help</a></li>
                    <li><a href="login.html"><i class="fa fa-sign-out pull-right"></i> Log Out</a></li>
                  </ul>
                </li>

I also try adding initialization code in ngAfterViewInit() of the topvanbar component:


 ngAfterViewInit(){     
     $('.dropdown-toggle').dropdown(); 
  }

This also is not working.

kmkatsma commented 5 years ago

So this was inactive very long time, but I just updated to angular 7, and project is now based off of angular CLI. So probably you've moved on, but just thought I should respond and close all the issues =)