Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in the web console - icons are display correctly #14

Open
mic0331 opened this issue Aug 8, 2016 · 6 comments
Open

error in the web console - icons are display correctly #14

mic0331 opened this issue Aug 8, 2016 · 6 comments

Comments

@mic0331
Copy link

mic0331 commented Aug 8, 2016

Hi,

Using this plugin with the angular2-quickstart template I'm getting errors in my web console however they are displayed properly on the page.

GET http://localhost:3000/fonts/fontawesome-webfont.woff2?v=4.6.3
:3000/fonts/fontawesome-webfont.woff?v=4.6.3:1 GET http://localhost:3000/fonts/fontawesome-webfont.woff?v=4.6.3
:3000/fonts/fontawesome-webfont.ttf?v=4.6.3:1 GET http://localhost:3000/fonts/fontawesome-webfont.ttf?v=4.6.3
:3000/fonts/fontawesome-webfont.woff2?v=4.6.3:1 GET http://localhost:3000/fonts/fontawesome-webfont.woff2?v=4.6.3
:3000/fonts/fontawesome-webfont.woff?v=4.6.3:1 GET http://localhost:3000/fonts/fontawesome-webfont.woff?v=4.6.3
:3000/fonts/fontawesome-webfont.ttf?v=4.6.3:1 GET http://localhost:3000/fonts/fontawesome-webfont.ttf?v=4.6.3

Any idea ?
I follow your doc and included the two references in systemjs.config.js

@travelist
Copy link
Owner

travelist commented Aug 8, 2016

@mic0331 Thank you for the comment, Actually i'm not sure the reason eather.. I gonna just quick try to investigate the reason and will update later.

@mvnce
Copy link

mvnce commented Aug 26, 2016

Did you use any CSS pre-processor? I got the same problem with LESS (icons are displayed correctly). When I change to CSS files, there is no error.

@scopolamin
Copy link

scopolamin commented Jan 18, 2017

Angular 2

"font-awesome": "^4.7.0",
"angular2-fontawesome": "~0.7.0"

Wrong path:

GET http://localhost:53917/fonts/fontawesome-webfont.woff2?v=4.7.0
fonts/fontawesome-webfont.woff?v=4.7.0:1
GET http://localhost:53917/fonts/fontawesome-webfont.woff?v=4.7.0 404 (Not Found)
fonts/fontawesome-webfont.ttf?v=4.7.0:1
GET http://localhost:53917/fonts/fontawesome-webfont.ttf?v=4.7.0
fonts/fontawesome-webfont.woff2?v=4.7.0:1
GET http://localhost:53917/fonts/fontawesome-webfont.woff2?v=4.7.0
fonts/fontawesome-webfont.woff?v=4.7.0:1
GET http://localhost:53917/fonts/fontawesome-webfont.woff?v=4.7.0
fonts/fontawesome-webfont.ttf?v=4.7.0:1
GET http://localhost:53917/fonts/fontawesome-webfont.ttf?v=4.7.0

Should be:

GET http://localhost:53917/node_modules/font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0
fonts/fontawesome-webfont.woff?v=4.7.0:1
GET http://localhost:53917/node_modules/font-awesome/fonts/fontawesome-webfont.woff?v=4.7.0 404 (Not Found)
fonts/fontawesome-webfont.ttf?v=4.7.0:1
GET http://localhost:53917/node_modules/font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0
fonts/fontawesome-webfont.woff2?v=4.7.0:1
GET http://localhost:53917/node_modules/font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0
fonts/fontawesome-webfont.woff?v=4.7.0:1
GET http://localhost:53917/node_modules/font-awesome/fonts/fontawesome-webfont.woff?v=4.7.0
fonts/fontawesome-webfont.ttf?v=4.7.0:1
GET http://localhost:53917/node_modules/font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0

@scopolamin
Copy link

scopolamin commented Jan 18, 2017

Seems to be a src-url mistake in node_modules/font-awesome/css/font-awesome.css

@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;
}

@sekar-fa
Copy link

Try adding as below so that it becomes a global style,
https://github.com/angular/angular-cli/wiki/stories-global-styles

"styles": [
"../node_modules/font-awesome/css/font-awesome.min.css",
//...
],

@michaeldevenney
Copy link

This happens on an ASP.NET site as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants