0

I'm trying to install bootstrap-material-icons on my angular 2 application, but the icons aren't displays, like the module isn't installed.
I have followed (as always) the instructions from this site, but i have two doubts:
1) First of all, because of the npm installation on my project, that is based on an angular-cli installation, the css folder of bootstrap-material is in:

/node_modules/bootstrap-material-design-icons/css/material-icons.css

and so i have tried to change the relative link to the css, to the folder where the css is present, but nothing happens.

2) I have tried, in second instance to add the css to the styles object inside the angular-cli.json in this way:

.....
"styles": [
    "paper.css",
    "styles.css",
    "style_genioimprese.css"
    "../node_modules/bootstrap-material-design-icons/css/material-icons.css"
],.....

but even in this way doesn't work and to me (but i want to know if i'm right) that's a way that can't work, because when i build the application, angular-cli will recover the css but it would left behind all the other bootstrap material-icons element that he will need like the font folder, where all the glypicon are placed.

mautrok
  • 961
  • 1
  • 17
  • 41
  • did you restart your app after the angular-cli changes? – Bhavik Patel Aug 09 '17 at 09:32
  • yes of course :) – mautrok Aug 09 '17 at 10:09
  • well the path seems to be fine, can you please check if the `css` files are indeed under `node_modules` ? – Bhavik Patel Aug 09 '17 at 10:11
  • Yes it's fine, in fact if i open the inspector and take a look at the style editor i find the file correctly loaded. – mautrok Aug 09 '17 at 10:16
  • Ok i have solved the problem, seriously i don't know why, i have checked the folder and found another css, material-icons2.css that is different from the one referenced in the link above, i've linked it and now it works. Maybe later i'll put it in an answer. – mautrok Aug 09 '17 at 10:21

0 Answers0