Kendo-angular-treeview node click navigate

0 Answers 108 Views
TreeView
Patrick
Top achievements
Rank 1
Patrick asked on 06 Jul 2023, 10:02 PM

I'm looking at the Node Template - TreeView - Kendo UI for Angular (telerik.com) . Trying to figure out how to open a new component / page when clicking on the tree node. Can someone provide an example?

 

Thanks,

Bryian Tan

Yanmario
Telerik team
commented on 11 Jul 2023, 09:45 AM

Hi Bryian,

You can handle the click event using the template or the nodeClick event and use the Angular router to navigate to a different component. Another approach can also be taken by using ngIf to conditionally render a component on the page depending on the nodeClick event result.

I don't have a specific example of using a Router, but it should be a pretty straightforward implementation. A do have an example with ngIf - https://stackblitz.com/edit/angular-kzmx2a?file=src%2Fapp%2Fapp.component.ts

I hope this helps.

Regards,
Yanmario
Progress Telerik     

No answers yet. Maybe you can help?

Tags
TreeView
Asked by
Patrick
Top achievements
Rank 1
Share this question
or