coreui / coreui-angular

CoreUI Components Library for Angular https://coreui.io/angular/docs/
https://coreui.io/angular/
MIT License
248 stars 146 forks source link

Navigate to route on AppSideBarNav parent menu click [in Angular] #123

Closed natasha-madhu closed 2 years ago

natasha-madhu commented 3 years ago

Hello! This issue is identical to https://github.com/coreui/coreui-react/issues/98 but in Angular. When the user clicks on a parent menu item, it doesn’t navigate to the path specified in _nav.ts, it just toggles the dropdown. Is there a way, in Angular, to override the default behavior to allow simultaneous toggle and navigation when the user clicks? Thank you!!

xidedix commented 2 years ago

Hi,

You can use EventManager at DefaultLayoutComponent level, and listen to user click on sidebar parent menu (aka nav-dropdown-toggle). Should work as a workaround at least.