Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign uptree: importing MatIconModule and MatButtonModule is necessary #20239
Comments
|
As this is docs' content, I'll move this over the the Components repo. This repo is only for docs infrastructure. |
|
For what it's worth, the icon and button modules aren't mandatory for the tree to work, but they are needed if you wanted to replicate the demo from the docs. We should still mention it somewhere in the docs. |
|
@crisbeto Considering most of the components usage examples are using |
|
Yes, for me as an Angular Material beginner I copied the code from the documentation and spent half an hour debugging until I found out why the material tree style is not applied. There is no descriptive error message. The tree just looks strange like in this issue: |
It would be helpful to mention in the API reference for Angular Material tree that besides the MatTreeModule also MatIconModule and MatButtonModule must be imported into the app.module.ts.
(eg. when you use a "Tree with flat nodes")