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

Can't bind to 'nodes' since it isn't a known property of 'kendo-treeview'

3 Answers 1907 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
mark
Top achievements
Rank 1
Veteran
mark asked on 01 May 2020, 08:35 AM

Not sure what that error means. Here is my tree definition:

<kendo-treeview
        textField="text"
        [nodes]="data"
        kendoTreeViewExpandable
        kendoTreeViewSelectable
        kendoTreeViewHierarchyBinding
        childrenField="items"
    >
</kendo-treeview>

And here is one from the Doc:

kendo-treeview
        [nodes]="data"
        textField="text"
        kendoTreeViewExpandable
        kendoTreeViewSelectable
        kendoTreeViewHierarchyBinding
        childrenField="items"
    >
    </kendo-treeview>

 

Trying very hard to see a difference.

 

Thanks

3 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 05 May 2020, 05:56 AM

Hi Mark,

Thank you for the provided details.

Indeed the markup looks valid. Typically such an error appears when the TreeViewModule is not imported in the root or feature module (in StackBlitz is app.module.ts):

...
import { TreeViewModule } from '@progress/kendo-angular-treeview';


@NgModule({
  bootstrap:    [ AppComponent ],
  declarations: [ AppComponent ],
  imports:      [ BrowserModule, BrowserAnimationsModule, TreeViewModule]
})
export class AppModule { }

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

Let me know how it goes.

Regards,
Martin
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.
0
Mark
Top achievements
Rank 1
Veteran
Iron
answered on 05 May 2020, 08:11 AM

Yes, that was the problem. I am creating a wrapper but I wasn't importing it into the feature module. On a similar note, in the component ts file of the treeview wrapper how can I access native methods/events/properties of the treeview control?

Thanks

0
Martin
Telerik team
answered on 06 May 2020, 10:21 AM

Hi Mark,

I noticed that my colleague answer a similar question in ticket 1464462 here:

https://www.telerik.com/forums/creating-a-component-wrapper

Please check the forum thread and if any further assistance is required, do not hesitate to write back.

Regards,
Martin
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
Martin
Telerik team
Mark
Top achievements
Rank 1
Veteran
Iron
Share this question
or