How to change Angular CLI favicon

Make a png image with same name (favicon.png) and change the name in these files:

index.html:

<link rel="icon" type="image/x-icon" href="https://stackoverflow.com/questions/40817280/favicon.png" />

angular-cli.json:

"assets": [
    "assets",
    "https://stackoverflow.com/questions/40817280/favicon.png" 
],

And you will never see the angular default icon again.

Size should be 32×32, if more than this it will not display.

NOTE:
This will not work with Angular 9

For angular 9 you have to put favicon inside assets then give path like

<link rel="icon" type="image/x-icon" href="https://stackoverflow.com/questions/40817280/assets/favicon.png">

Leave a Comment