Angular Material Tree doesn't render and current page gets stuck

Discussão em 'Angular' iniciado por SGE59, Fevereiro 10, 2025.

  1. SGE59

    SGE59 Guest

    In an Angular project I want to display a simple Material Tree. For this I have also imported the {MatTreeModule} from '@angular/material/tree'; in the app.module. Also no errors are displayed and it compiles. However, no tree appears at the desired location. I have tested this in several components. And if the tree is in a component (without being displayed), the whole page gets stuck and no button or the like works anymore. You can click them, but they suddenly have no function. In some components the whole content stays white and nothing is rendered. What am I doing wrong or have I forgotten?

    Therefore i used this simple example from angular material page:

    <mat-tree>
    <mat-tree-node> parent node </mat-tree-node>
    <mat-tree-node> -- child node1 </mat-tree-node>
    <mat-tree-node> -- child node2 </mat-tree-node>
    </mat-tree>

    Continue reading...

Compartilhe esta Página