Topic: How do I hide the sidenav when an menuitem is clicked?

Oskar Helling free asked 5 years ago


How do I make the sidenav hide after the user has clicked an item?


Arkadiusz Idzikowski staff answered 5 years ago


You need to add template reference variable to the sidenav component and use sidenav.hide() method on the link click. For example:

<mdb-side-nav #sidenav></mdb-side-nav>

<a (click)="sidenav.hide()"></a>


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 7.5.0
  • Device: Computer
  • Browser: Chrome
  • OS: macos
  • Provided sample code: No
  • Provided link: No