1

Navbar toggle menu is opening but not closing.

I have tried all the ways given here and others also to rectify this bug. But doesn't help me. My code as follows:

<nav class="navbar navbar-expand-lg navbar-dark fix nav-color imgbg">
    <a class="navbar-brand red" href="#">Logo Title</a>
    <button 
            class="navbar-toggler" 
            type="button" 
            data-toggle="collapse" 
            data-target="#navbarNav" 
            aria-controls="navbarNav" 
            aria-expanded="true" 
            aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNav" ng-controller="HeaderController">
        <ul class="navbar-nav ml-auto">
            <li class="nav-item" ng-class="{ active: isActive('/home') }">
                <a class="nav-link" href="#!/home">Home</a>
            </li>
            <li class="nav-item" ng-class="{ active: isActive('/about') }">
                <a class="nav-link" href="#!/about">Objectives</a>
            </li>
            <li class="nav-item" ng-class="{ active: isActive('/contact') }">
                <a class="nav-link" href="#!/contact">Contact</a>
            </li>

        </ul>
    </div>
</nav>

Please help me to solve this.

1 Answer 1

1

Placing the libs in order works for me:

my order as follows:

in head:

<link rel="stylesheet" href="/assets/css/bootstrap.css" />
<link rel="stylesheet" href="./assets/css/style.css" />

in end/bottom of body:

    <script src="./assets/js/jquery.min.js"></script>
    <script src="./assets/js/bootstrap.min.js"></script>
    <script src="./assets/libs/angular.min.js"></script>
    <script src="./assets/libs/angular-ui-router.js"></script>
    <script src="app/app.js"></script>
    <script src="app/components/shared/navbar.js"></script>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.