Routing
You can utilize Angular Router and use the Drawer as a navigational component.
To set the functionality, either:
- Use the select event to navigate to the route that the Drawer item represents, or
- Use a template to add the routerLink directive to the item link. You could apply the
k-drawer-link
CSS class to the link element in order to expand it to fit the whole Drawer item.
Generating the RouterLink Directive
The following example demonstrates how to use a template to render the routerLink
directive.
Getting the Selected Item
The following example demonstrates how to convert the routes to an array of DrawerItems and navigate to the selected item route in the select
event.