Topic: Associating a sidenav entry with router
Arkadiusz Idzikowski staff answered 6 years ago
mdb2 pro commented 6 years ago
What do you mean there is no way ? This is how sidebar works. User clicks sidebar item and view changes. Alternatively, user lands through a link and sidebar reflects current state. How come the sidebar is selected correctly in this link ? https://mdbootstrap.com/angular/advanced/modals/Arkadiusz Idzikowski staff commented 6 years ago
Dear mdb2, There are some problems with the second behaviour you mentioned (the one when user lands through a link and sidenav should reflect the state) and we have to fix them. Best, Arekmdb2 pro commented 6 years ago
Arek, when will you fix it ?Damian Gemza staff commented 6 years ago
Dear mdb2, We can't provide you any ETA on this because we have some other tasks in future sprints. But we'll do our best to fix it in nearest future. Best Regards, Damianmdb2 pro commented 6 years ago
Any news ?Damian Gemza staff commented 6 years ago
Dear mdb2, Still, we haven't got the fix for that case. We'll let you know when it will be ready. Best Regards, Damianmdb2 pro commented 6 years ago
Thanks Damian, Do you have an estimate ?Damian Gemza staff commented 6 years ago
Unfortunately, We can't provide you with any ETA, because we've got other fixes with higher priority. Best Regards, Damianmdb2 pro commented 6 years ago
Any news ? How can the user know where he is by looking at the sidenav ? How can I set the "active" class on that menu item ?Arkadiusz Idzikowski staff commented 6 years ago
Dear mdb2, Unfortunately this problem is not fixed yet and we can't provide you with any ETA. Regards, Arekmdb2 pro commented 6 years ago
Is there a workaround ?Arkadiusz Idzikowski staff commented 6 years ago
Unfortunately we cannot provide a workaround for now.mdb2 pro commented 6 years ago
Then I don't understand how the user can tell in what page he is in. He will get lost In the jQuery version there was a solutionmdb2 pro answered 6 years ago
Arkadiusz Idzikowski staff answered 6 years ago
skota524 pro commented 5 years ago
Hi,
This is not working for nested menu.
https://mdbootstrap.com/support/angular/how-to-implement-mdb-side-nav-with-multi-level-menu/
Can you please provide a fix/ workaround for this issue.?
Thanks, Shashi
Arkadiusz Idzikowski staff commented 5 years ago
Could you provide more details about the problem?
mdb2 pro answered 6 years ago
Arkadiusz Idzikowski staff answered 6 years ago
<a routerLink="/test" routerLinkActive="active">Test</a>
mdb2 pro answered 6 years ago
<!-- Simple link -->
<mdb-accordion-item class="no-collase">
<mdb-accordion-item-head mdbWavesEffect><i class="fa fa-hand-pointer-o"></i> Simple link</mdb-accordion-item-head>
<mdb-accordion-item-body></mdb-accordion-item-body>
</mdb-accordion-item>
Can you specify what should be in the head and what in the body, e.g., a complete snippet ?
mdb2 pro commented 6 years ago
<!-- Simple link -->
<mdb-accordion-item class="no-collase">
<mdb-accordion-item-head mdbWavesEffect><i class="fa fa-hand-pointer-o"></i> Simple link</mdb-accordion-item-head>
<mdb-accordion-item-body></mdb-accordion-item-body>
</mdb-accordion-item>
Can you specify what should be in the head and what in the body, e.g., a complete snippet ?
Arkadiusz Idzikowski staff commented 6 years ago
Sorry, I thought you were trying to add routerLinkActive to the nested link. It looks like there are some problems with mdb-accordion-item-head styles, we will take a closer look at it and update our documentation with new examples.
For now please use this styles:
mdb2 pro answered 6 years ago
Arkadiusz Idzikowski staff answered 6 years ago
mdb-accordion-item-head.active a h5 { color: red!important; }
mdb2 pro answered 6 years ago
Arkadiusz Idzikowski staff answered 6 years ago
mdb2 pro answered 6 years ago
mdb2 pro answered 6 years ago
Arkadiusz Idzikowski staff answered 6 years ago
mdb2 pro answered 6 years ago
In ver 7.5.4 change log it says:
- Sidenav with routerLink will now open active links after reload while using HashLocationStrategy.
Is it related and where can I find more info regarding HashLocationStrategy ?
Damian Gemza staff commented 6 years ago
Just Google "Hash Location Strategy Angular". This is the Angular Router mechanism which will allow you to use the hash in the route path.
https://codecraft.tv/courses/angular/routing/routing-strategies/
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- User: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No