javascript - Bootstrap4 navbar always collapsed -
for reason, exact same code have started working differently once updated angular... here navbar code
<nav *ngif="authservice.isloggedin" class="navbar navbar-toggleable-md navbar-light bg-faded"> <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarsupportedcontent" aria-controls="navbarsupportedcontent" aria-expanded="false" aria-label="toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <a class="navbar-brand" routerlink="home">mavis</a> <div class="collapse navbar-collapse" id="navbarsupportedcontent"> <ul class="navbar-nav mr-auto"> <li class="nav-item" *ngif="authservice.isadmin"> <a class="nav-link" routerlink="settings">settings</a> </li> <li class="nav-item"> <a class="nav-link" routerlink="home">home</a> </li> <li class="nav-item"> <a class="nav-link" routerlink="session">session</a> </li> </ul> <div class="nav navbar-nav navbar-right"> <button (click)="logout()" class="navbar-brand"><strong>logout</strong></button> </div> </div>
problem navbar collapsed, regardless of width of screen, looks great on phone, not on desktop. i'm sure setup bootstrap angular 2 project properly.. sure, added these 'angular-cli.json' file
"styles": [ "../node_modules/bootstrap/dist/css/bootstrap.min.css", "styles.css" ], "scripts": [ "../node_modules/jquery/dist/jquery.js", "../node_modules/tether/dist/js/tether.js", "../node_modules/popper.js/dist/umd/popper.js", "../node_modules/bootstrap/dist/js/bootstrap.js" ],
wiki
Comments
Post a Comment