Change the favicon in Angular Easy way
In this tutorial, we are going to learn about how to change the default favicon in angular app, which is set by the angular-cli.
Changing favicon
-
Open the angular app in your favorite code editor.
-
Navigate to src folder and remove the
favicon.icofile. -
Now, add a new favicon inside the
srcfolder.
Note: The favicon filename should be
favicon.icolike in the above screenshot.
- Reload your app to see the new favicon.
If your favicon file name and image format is different like(icon2.png or icon9.jpg) then you can follow the below steps.
-
Add your favicon inside the src folder.
-
Open the
index.htmlfile and change the favicon file name (with the newly added icon name).
<link rel="icon" type="image/x-icon" href="icon24.png">- Inside the
angular.jsonfile add the favicon inassetsarray.
"assets": [
"assets",
"icon24.png"],

