Topic: Dropdown menu always opened
Hello, i copied one of the navbar examples on your site with a dropdown menu. the dropdown menu is always opened whatever i do. thank you
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Open
Specification of the issue
- User: Pro
- Premium support: Yes
- Technology: MDB Angular
- MDB Version: MDB5 3.0.1
- Device: macbook pro
- Browser: Chrome
- OS: IOS
- Provided sample code: No
- Provided link: No
Related topics
Arkadiusz Idzikowski staff commented 2 years ago
Could you please edit your post and provide an example code that you tried to use?
In this case you should copy the code from the Angular documentation: https://mdbootstrap.com/docs/angular/navigation/navbar/
moulot pro premium priority commented 2 years ago
Hello, i used the angular version. Just tried this one from your link to no avail :
Dropdown link
moulot pro premium priority commented 2 years ago
i don't know how to send you the code : it's from the navbar page with this comment Dropdown You can also use dropdowns in your navbar nav. Dropdown menus require a wrapping element for positioning, so be sure to use separate and nested elements for .nav-item and .nav-link as shown below.
Arkadiusz Idzikowski staff commented 2 years ago
You can include the code when you edit your post (there is a 'Code sample' button in our editor that will help you to format the code correctly).
You need to make sure to use the code from the Angular documentation and not the Standard version (I included the link in my previous comment). To configure the dropdown component correctly you need to use
mdbDropdown
,mdbDropdownToggle
, andmdbDropdownMenu
directives like in our documentation. Please also remember to import theMdbDropdownModule
in yourapp.module
file.