I am using Angular 8. I have added the font-awesome path in the angular.json like this.
"./node_modules/font-awesome/css/font-awesome.css"
However, all the icons were coming as empty boxes (not loading). So, I put all the font-awesome files in the assets folder. Then, I put a link to the css file in the index.html
<link rel="stylesheet" href="assets/styles/css/font-awesome.css">
It still did not work. So, I hit the font-awesome.css file directly from my browser.
mysite.mymy/assets/styles/css/font-awesome.css
It did open up in the browser. The css file has a link to "../fonts/". Like below:
@font-face {
font-family: 'FontAwesome';
src: url('../fonts/fontawesome-webfont.eot?v=4.7.0');
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}
So, I hit that link.
mysite.mymy/assets/styles/fonts/fontawesome-webfont.eot?v=4.7.0
But it is redirecting to the home page. What's the issue? Icons are not loading.