akveo / nebular

:boom: Customizable Angular UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/nebular
MIT License
8.06k stars 1.51k forks source link

Menu and MenuService not working as described in the documentation. Active menu item not working #1887

Open pasqualepalmaccio opened 5 years ago

pasqualepalmaccio commented 5 years ago

Hi, in documentation at https://akveo.github.io/nebular/docs/components/menu/overview#nbmenuitem is described as you can get selected item and, in live mode, selected item received active class. How do you set selected item? in my "getSelected()" selected item is null. My menu's behaviour is similar to menu described in first section https://akveo.github.io/nebular/docs/components/menu/overview#nbmenucomponent where items never be "active status"

cryosgurl commented 5 years ago

This is still an issue, I have tried it as well as documented. Please update this ASAP or tell us how to get the active selected menu item. thnx

Daggle24 commented 4 years ago

I have this issue too please update this

Edit: Hi I fixed this way:

in the link property of every single menu item I set the full path of the Item. Previously i was only setting the /componentName instead of the /fullpath/componentName

hughnguyen9999 commented 4 years ago

I got it too. Event the example in document doesn't work, you can try and see no change in "selectedItem": https://akveo.github.io/nebular/docs/components/menu/examples#nbmenuservice

sgClaudia98 commented 3 years ago

Is there a way to observe menu selected item? I need to collapse my sidebar when an item is selected. Any advice????

I triggered a function for the click event but item is null