How to host material icons offline?

后端 未结 19 2484
无人及你
无人及你 2020-12-02 06:55

My apologies if this is a very simple question, but how do you use google material icons without a



        
19条回答
  •  死守一世寂寞
    2020-12-02 07:53

    With angular cli

    npm install angular-material-icons --save
    

    or

    npm install material-design-icons-iconfont --save
    

    material-design-icons-iconfont is the latest updated version of the icons. angular-material-icons is not updated for a long time

    Wait wait wait install to be done and then add it to angular.json -> projects -> architect -> styles

     "styles": [
              "node_modules/material-design-icons/iconfont/material-icons.css",
              "src/styles.scss"
            ],
    

    or if you installed material-desing-icons-iconfont then

    "styles": [
                  "node_modules/material-design-icons-iconfont/dist/material-design-icons.css",
                  "src/styles.scss"
                ],
    

提交回复
热议问题