This is a migrated thread and some comments may be shown as answers.

Creating a component wrapper

1 Answer 582 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
mark
Top achievements
Rank 1
Veteran
mark asked on 04 May 2020, 09:20 AM

I am implementing a Treeview into the app. But first I need to create a wrapper. Is there a recommended way of creating Kendo components wrappers?

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Svet
Telerik team
answered on 06 May 2020, 05:25 AM

Hi Mark,

In such cases we recommend the composition over inheritance approach where the wrapper component passes the required configuration options via @Input properties and the wrapped component communicates to its wrapper via @Outputs. Please check the following article from the official Angular documentation demonstrating how Angular components interact using the @Input and @Output decorators:

https://angular.io/guide/component-interaction

Here is an example demonstrating a simple wrapper component using a single @Input:

https://stackblitz.com/edit/angular-efugeq?file=app/app.component.ts

I hope the provided information helps. Please let us know in case any additional details are required for this case. Thank you.

Regards,
Svetlin
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
TreeView
Asked by
mark
Top achievements
Rank 1
Veteran
Answers by
Svet
Telerik team
Share this question
or