[SOLVED] Implemented bootstrap - Dropdown isn't working

#1

Hy everybody,

i’ve just started a new meteor directory on which i’m working to do an app. I’m actually facing an issue i would understand for a better comprrehension of Meteor.

I’ve litterally just created a new project, in which i’ve put a bootstrap navbar from their documentation :

<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
        <a class="navbar-brand" href="#">Navbar</a>
        <button class="navbar-toggler" 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>

        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav ml-auto">
                <li class="nav-item active">
                    <a class="nav-link" href="#">Home</a>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown"
                        aria-haspopup="true" aria-expanded="false">
                        Modules
                    </a>
                    <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                        <a class="dropdown-item" href="#">Action</a>
                        <a class="dropdown-item" href="#">Another action</a>
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="#">Something else here</a>
                    </div>
                </li>
                <li class="nav-item">
                    <a class="nav-link disabled" href="#">Disabled</a>
                </li>
            </ul>
        </div>
    </nav>

I’ve added bootstrap.min.css / js in client/compatibility folder. they are properly loaded (I can figure out some css changes :slight_smile: ).

Perhaps, when i trigger a click on “Modules”, the dropdown doesn’t work. The click is triggering a new link in my searchbar “my_url/#”. Perhaps, no dropdown at all :open_mouth: .

I saw some topics related to this, but none of them really explains what really happens in Meteor, and why it “breaks” some composants.

Also, what should i do better ?

Have a productive night,

Brawcks.

#2

Well, i don’t have the answer to the “why”, but for thoses having the same problem :

It properly works when i put everything in public directory.

Solved :smiley: