0

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**
1

1 Answer 1

0

Angular 2: file not found on local .json file

It seems that the "static" folder not accessible. This previous issue may help.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.