How to change Angular CLI favicon

后端 未结 30 1606
谎友^
谎友^ 2020-12-07 16:32

How can I change the default favicon that is set by the Angular CLI?

I have tried many things, but it always shows the Angular logo as the favicon, even though I hav

30条回答
  •  温柔的废话
    2020-12-07 16:40

    Please follow below steps to change app icon:

    1. Add your .ico file in the project.
    2. Go to angular.json and in that "projects" -> "architect" -> "build" -> "options" -> "assets" and here make an entry for your icon file. Refer to the existing entry of favicon.ico to know how to do it.
    3. Go to index.html and update the path of the icon file. For example,

    4. Restart the server.

    5. Hard refresh browser and you are good to go.

提交回复
热议问题