I added the example retrieved from https://material.angular.io/components/tree/overview (The example can be seen[https://stackblitz.com/angular/arbvompqpmg?file=main.ts]) the documentation but it throw this error:
Can't bind to 'dataSource' since it isn't a known property of 'mat-tree'.
1. If 'mat-tree' is an Angular component and it has 'dataSource' input, then verify that it is part of this module.
2. If 'mat-tree' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
I added both
import {CdkTreeModule} from '@angular/cdk/tree';
and
import {MatTreeModule} from '@angular/material';
My current versions are:
"@angular/animations": "^6.0.6",
"@angular/cdk": "^6.3.0",
"@angular/common": "^6.0.6",
"@angular/compiler": "^6.0.6",
"@angular/core": "^6.0.6",
"@angular/forms": "^6.0.6",
"@angular/http": "^6.0.6",
"@angular/material": "^6.3.0",
Do you have any idea about how to solve this problem? I read other solutions and everybody explains to add correct imports, so I did but the problem still.