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
Press Ctrl+F5 in browser window
What really works for me was putting my favicon into assets folder and apear automatically in the browser.
<link rel="icon" type="image/x-icon" href="assets/favicon.png">
In my case, the problem was that I had different dimensions compared to normal one. I had 48x48 px
whereas it was expecting 32x32 px
and my extension was png so I had to change it to ico
An editor (in my case IDEA 2020.2) can sometimes add src/
prefix to icon location in href
.
I mean
<link rel="icon" ... href="src/favicon.ico">
instead of
<link rel="icon" ... href="favicon.ico">
So in this case you should remove this src/
part in href
. This solved the problem for me.
Please follow below steps to change app icon:
Go to index.html and update the path of the icon file. For example,
Restart the server.
For future readers, if this happens to you, your browser wants to use the old cached favicon.
Follow these steps:
Fixed.