Whenever I attempt to click the hamburger icon to toggle the navigation on a small screen width, nothing happens. I've tried looking for solutions in previous questions, but I can't seem to find where my error lies.
Moreover, when I remove the navbar-dark
class, the hamburger disappears completely. Adding this class back changes the color of the navbar to white, which is not the desired effect.
<nav class="navbar navbar-dark navbar-expand-lg">
<div class="container-fluid px-0">
<div class="row w-100">
<div class="col-2">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo03" aria-controls="navbarTogglerDemo03" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</div>
<div class="col-10">
<div class="collapse justify-content-end navbar-collapse" id="navbarTogglerDemo03">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item active">
<a class="nav-link" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Portfolio</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Book Me</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</nav>
Angular.json:
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.css",
"node_modules/aos/dist/aos.css"
],
"scripts": [
"node_modules/popper.js/dist/popper.min.js",
"node_modules/jquery/dist/jquery.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js"
],
Package.json:
"dependencies": {
"@angular/animations": "^7.2.11",
"@angular/cdk": "^7.3.6",
"@angular/common": "~7.2.0",
"@angular/compiler": "~7.2.0",
"@angular/core": "~7.2.0",
"@angular/fire": "^5.1.1",
"@angular/forms": "~7.2.0",
"@angular/material": "^7.3.6",
"@angular/platform-browser": "~7.2.0",
"@angular/platform-browser-dynamic": "~7.2.0",
"@angular/router": "~7.2.0",
"aos": "^2.3.4",
"bootstrap": "^4.3.1",
"core-js": "^2.5.4",
"firebase": "^5.8.5",
"jquery": "^3.3.1",
"ng-recaptcha": "^4.2.1",
"popper.js": "^1.14.7",
"rxjs": "~6.3.3",
"tslib": "^1.9.0",
"zone.js": "~0.8.26"
},