student18
student18

Reputation: 538

Angular Material Tree isn't displayed correctly using angular example

after successfully installing @angular/material, @angular/cdk and @angular/animations using npm install --save, I tried to rebuild the example of a flat tree given by angular link.

After fixing the error message Could not find Angular Material core theme using this stack post solution link with adding

@import '../node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css';

to my global styles.scss, it still doesn't display the tree correctly.

enter image description here

There is no error given in console. Can anyone help me to fix this issue?

Upvotes: 0

Views: 169

Answers (1)

Fabian Küng
Fabian Küng

Reputation: 6193

You need to add the Angular Material Icon Font, otherwise the icons won't be displayed properly. Add this line in your index.html file:

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

For more information check the official Getting started section of the Angular Material documentation.

Upvotes: 1

Related Questions