CirclonGroup / angular-tree-component

A simple yet powerful tree component for Angular (>=2)
https://angular2-tree.readme.io/docs
MIT License
1.1k stars 492 forks source link

Property 'tree' does not exist on type #872

Closed aplatov76 closed 3 years ago

aplatov76 commented 3 years ago

Hello, i do use simple filtering, but a have error: `
ERROR in src/app/shared/modules/products/components/products/products.component.html:44:82 - error TS2339: Property 'tree' does not exist on type 'ProductsComponent'.

44             <input type="text" class="form-control" id="filter" #filter (keyup)="tree.treeModel.filterNodes(filter.value)" placeholder="" aria-label="Text input with segmented dropdown button">
                                                                                    ~~~~

  src/app/shared/modules/products/components/products/products.component.ts:15:18
    15     templateUrl: './products.component.html',
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component ProductsComponent.

`

component template

kplatova97 commented 3 years ago

Problem is in <ng-template #treeNodeTemplate let-node let-index="index">

kplatova97 commented 3 years ago

I did forgot added to input: *ngIf="nodes".