How to change Angular CLI favicon

后端 未结 30 1650
谎友^
谎友^ 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:35

    Following steps worked for me.

    1. Remove default "favicon.ico" file with a new one with different name i.e. "_favicon.ico" in my case.

      Note :: Don't keep the default name, as it's get's cached in your browser and difficult to overwrite with new icon.

    2. Update index.html with new link tag i.e.

        
      
    3. Update .angular-cli.json with new icon name i.e. "_favicon.ico".

    4. Build & launch your app, and do a hard refresh Ctrl+F5.

提交回复
热议问题