angular2-fontawesome icon indicating copy to clipboard operation
angular2-fontawesome copied to clipboard

error in the web console - icons are display correctly

Open mic0331 opened this issue 7 years ago • 6 comments

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

mic0331 avatar Aug 08 '16 13:08 mic0331

@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.

travelist avatar Aug 08 '16 19:08 travelist

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.

mvnce avatar Aug 26 '16 03:08 mvnce

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 avatar Jan 18 '17 07:01 scopolamin

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

scopolamin avatar Jan 18 '17 08:01 scopolamin

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", //... ],

sekar-fa avatar Apr 24 '17 18:04 sekar-fa

This happens on an ASP.NET site as well.

michaeldevenney avatar Jun 23 '17 19:06 michaeldevenney