tree: importing MatIconModule and MatButtonModule is necessary
See original GitHub issueIt 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”)
import {MatButtonModule} from '@angular/material/button';
import {MatIconModule} from '@angular/material/icon';
import {MatTreeModule} from '@angular/material/tree';
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Not able to import "@angular/material" module - Stack Overflow
First, you need to install angular material by command: ... import {MatCardModule, MatIconModule, MatToolbarModule} from '@angular/material'.
Read more >Getting Started with Angular Material - Melissa Houghton
To use the material components in the app, we need to import them. ... import { CdkTreeModule } from '@angular/cdk/tree'; import ...
Read more >Stop Using Shared Material Module - Angular inDepth
Now, let's remove the Shared Material module and import only the modules which are needed. In employee.module.ts import MatFormFieldModule and MatSelectModule ...
Read more >Angular Material 7 - Tree - Tutorialspoint
Angular Material 7 - Tree, The , an Angular Directive, is used to create a tree with ... MatIconModule, MatButtonModule} from '@angular/material' import...
Read more >Angular Material Module Setup - Full Stack Soup
You will still need to take care of the imports which is discussed in ... import { MatButtonModule } from '@angular/material/button'; import ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@crisbeto Considering most of the components usage examples are using
mat-icon-button
directive or<mat-icon>
selector would this still be relevant (another example being the Menu component) ? Should some kind of global mention to these necessary imports be considered in the documentation then ?This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.