How to change default favicon icon in angular 2 app?
Put your icon file into /public or /src/assets folder. This will make your icon visible to the browser. See the branch on Github.
For Angular 9
I created a favicon.png file in /src and dropped the image inside the file
In angular.json add the file to assets
"assets": [
"src/favicon.png"
]
- In index.html use this script
<link rel="icon" type="image/x-icon" href="favicon.png">
You may need to clear your cache if you're using Chrome.
for Windows: CTRL F5 for Mac: CMD SHIFT R