Please, before closing as duplicate or bashing me take a look at what I've done.
I generated the project with the latest angular-fullstack generator, which included font-awesome. I tried adding this line into the main.html
just to verify that the icons are showing but I'm getting just a rectangle with letters and numbers inside. This is the html I'm trying to see:
<i class="fa fa-camera-retro"></i> fa-lg
This is my app.css
:
@import '~font-awesome/css/font-awesome.css';
/**
*Font Awesome Fonts
*/
@font-face {
font-family: 'FontAwesome';
src: url('/assets/fonts/font-awesome/fontawesome-webfont.eot?v=4.6.3');
src: url('/assets/fonts/font-awesome/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'),
url('/assets/fonts/font-awesome/fontawesome-webfont.woff?v=4.6.3') format('woff'),
url('/assets/fonts/font-awesome/fontawesome-webfont.ttf?v=4.6.3') format('truetype'),
url('/assets/fonts/font-awesome/fontawesome-webfont.svg?v=4.6.3#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}
this is my package.json
file:
"font-awesome": "^4.6.3",
This is my .htaccess
file:
# Allow access from all domains for web fonts
<IfModule mod_headers.c>
<FilesMatch "\.(eot|font.css|otf|ttc|ttf|woff|svg)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>
And the fonts have been extracted and placed in the Fonts directory like this:
/assets/fonts/font-awesome/
->FontAwesome.otf
->fontawesome-webfont.eot
->fontawesome-webfont.svg
->fontawesome-webfont.ttf
->fontawesome-webfont.woff
->fontawesome-webfont.woff2
Can anyone that has dealt with this issue before and done all that I did (specially if you have dealt with the mess that is the angular fullstack generator), help me?
Thanks in advance!
EDIT: This is the MIME types config:
# ##############################################################################
# # MIME TYPES AND ENCODING #
# ##############################################################################
# ------------------------------------------------------------------------------
# | Proper MIME types for all files |
# ------------------------------------------------------------------------------
<IfModule mod_mime.c>
# Audio
AddType audio/mp4 m4a f4a f4b
AddType audio/ogg oga ogg
# JavaScript
# Normalize to standard type (it's sniffed in IE anyways):
# http://tools.ietf.org/html/rfc4329#section-7.2
AddType application/javascript js jsonp
AddType application/json json
# Video
AddType video/mp4 mp4 m4v f4v f4p
AddType video/ogg ogv
AddType video/webm webm
AddType video/x-flv flv
# Web fonts
AddType application/font-woff woff
AddType application/vnd.ms-fontobject eot
# Browsers usually ignore the font MIME types and sniff the content,
# however, Chrome shows a warning if other MIME types are used for the
# following fonts.
AddType application/x-font-ttf ttc ttf
AddType font/opentype otf
# Make SVGZ fonts work on iPad:
# https://twitter.com/FontSquirrel/status/14855840545
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
# Other
AddType application/octet-stream safariextz
AddType application/x-chrome-extension crx
AddType application/x-opera-extension oex
AddType application/x-shockwave-flash swf
AddType application/x-web-app-manifest+json webapp
AddType application/x-xpinstall xpi
AddType application/xml atom rdf rss xml
AddType image/webp webp
AddType image/x-icon ico
AddType text/cache-manifest appcache manifest
AddType text/vtt vtt
AddType text/x-component htc
AddType text/x-vcard vcf
</IfModule>