I have created an angular 5 project with angular cli. referenced css in angular-cli.json style tag.
"styles": [
"styles.css",
"static/css/custom.css",
"static/css/style.bundle.css",
"static/css/vendors.bundle.css",
"static/css/fullcalendar.bundle.css"
]
when i try to run app in browser. i get font files aborted error in console
GET http://localhost:4200/fonts/font-awesome/fontawesome-webfont.woff2?v=4.7.0 net::ERR_ABORTED
fonts/font-awesome/fontawesome-webfont.woff?v=4.7.0:1 GET http://localhost:4200/fonts/font-awesome/fontawesome-webfont.woff?v=4.7.0 net::ERR_ABORTED
fonts/font-awesome/fontawesome-webfont.ttf?v=4.7.0:1 GET http://localhost:4200/fonts/font-awesome/fontawesome-webfont.ttf?v=4.7.0 net::ERR_ABORTED
these font files are being used in vendors.bundle.css
what have i tried:
- I tried to change url
src: url("fonts/socicon/socicon.eot")to src:url("/fonts/socicon/socicon.eot")in css file. I tried to load css like this,
<link rel="stylesheet" type="text/css" ref="./static/css/style.bundle.css"/>
but it gave me this error
**because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled**