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

4 posts, 0 answers
  1. mark
    mark avatar
    14 posts
    Member since:
    Jul 2014

    Posted 01 May Link to this post

    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

  2. Martin
    Admin
    Martin avatar
    252 posts

    Posted 05 May Link to this post

    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.
  3. Mark
    Mark avatar
    5 posts
    Member since:
    May 2020

    Posted 05 May in reply to Martin Link to this post

    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

  4. Martin
    Admin
    Martin avatar
    252 posts

    Posted 06 May Link to this post

    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.
Back to Top