/ / fonts / ionicons.ttf?v = 2.0.0 404(見つかりません)-CSS- Anuglar-ローカルホスト-javascript、html、css、angularjs、localhost

fonts / ionicons.ttf?v = 2.0.0 404(見つからない) - CSS - Anuglar - ローカルホスト - javascript、html、css、angularjs、localhost

誰かがこれを以下で解決する方法を教えてもらえますかエラー。 ? インターネットからテンプレートをダウンロードしています。角のある2つのコンポーネントに変換しようとしました。すべてが大丈夫です。localhost:4200の下のマシンで実行中のアプリを見ることができます。しかし、次のエラーが発生する理由がわからない アプリにアイコンがロードされていません

私の index.html 次のURLを持っています

 <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" >
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" >

私の meterialize.css

@font-face{
font-family:"Roboto";
src:local(Roboto Thin),
url("../fonts/roboto/Roboto-Thin.eot");
src:url("../fonts/roboto/Roboto-Thin.eot?#iefix")
format("embedded-opentype"),
url("../fonts/roboto/Roboto-Thin.woff2") format("woff2"),
url("../fonts/roboto/Roboto-Thin.woff") format("woff"),
url("../fonts/roboto/Roboto-Thin.ttf") format("truetype");font-weight:200;
}
@font-face{
font-family:"Roboto";
src:local(Roboto Light),
url("../fonts/roboto/Roboto-Light.eot");
src:url("../fonts/roboto/Roboto-Light.eot?#iefix") format("embedded-opentype"),
url("../fonts/roboto/Roboto-Light.woff2") format("woff2"),
url("../fonts/roboto/Roboto-Light.woff") format("woff"),
url("../fonts/roboto/Roboto-Light.ttf") format("truetype");
font-weight:300;
}
@font-face{
font-family:"Roboto";
src:local(Roboto Regular),
url("../fonts/roboto/Roboto-Regular.eot");
src:url("../fonts/roboto/Roboto-Regular.eot?#iefix") format("embedded-opentype"),
url("../fonts/roboto/Roboto-Regular.woff2") format("woff2"),
url("../fonts/roboto/Roboto-Regular.woff") format("woff"),
url("../fonts/roboto/Roboto-Regular.ttf") format("truetype");
font-weight:400;
}
@font-face{
font-family:"Roboto";
src:url("../fonts/roboto/Roboto-Medium.eot");
src:url("../fonts/roboto/Roboto-Medium.eot?#iefix") format("embedded-opentype"),
url("../fonts/roboto/Roboto-Medium.woff2") format("woff2"),
url("../fonts/roboto/Roboto-Medium.woff") format("woff"),
url("../fonts/roboto/Roboto-Medium.ttf") format("truetype");
font-weight:500;
}
@font-face{
font-family:"Roboto";
src:url("../fonts/roboto/Roboto-Bold.eot");
src:url("../fonts/roboto/Roboto-Bold.eot?#iefix") format("embedded-opentype"),
url("../fonts/roboto/Roboto-Bold.woff2") format("woff2"),
url("../fonts/roboto/Roboto-Bold.woff") format("woff"),
url("../fonts/roboto/Roboto-Bold.ttf") format("truetype");
font-weight:700;
}
@font-face{
font-family:"Material-Design-Icons";
src:url("../fonts/material-design-icons/Material-Design-Icons.eot?#iefix")
format("embedded-opentype"),
url("../fonts/material-design-icons/Material-Design-Icons.woff2") format("woff2"),
url("../fonts/material-design-icons/Material-Design-Icons.woff") format("woff"),
url("../fonts/material-design-icons/Material-Design-Icons.ttf") format("truetype"),
url("../fonts/material-design-icons/Material-Design-Icons.svg#Material-Design-Icons") format("svg");font-weight:normal;font-style:normal;}

コンソールエラー

materialize.min.js:6 GET http://localhost:4200/assets/fonts/ionicons.ttf?v=2.0.0 404 (Not Found)
(anonymous) @ materialize.min.js:6
(anonymous) @ materialize.min.js:7
(anonymous) @ materialize.min.js:6
(anonymous) @ materialize.min.js:6
materialize.min.js:6 GET http://localhost:4200/assets/fonts/roboto/Roboto-Regular.woff2 404 (Not Found)
(anonymous) @ materialize.min.js:6
(anonymous) @ materialize.min.js:7
(anonymous) @ materialize.min.js:6
(anonymous) @ materialize.min.js:6
core.js:3688 Angular is running in the development mode. Call enableProdMode() to enable the production mode.
about:106 GET http://localhost:4200/assets/fonts/ionicons.woff?v=2.0.0 404 (Not Found)
about:106 GET http://localhost:4200/assets/fonts/roboto/Roboto-Regular.woff 404 (Not Found)
about.component.ts:19 about {basicInfo: Array(1), exp: Array(1), prog_skills: Array(1), otherSkAndDevTools: Array(1), socialNwrk: Array(1)}
about:106 GET http://localhost:4200/assets/fonts/roboto/Roboto-Regular.ttf 404 (Not Found)
aos.min.js:1 GET http://localhost:4200/assets/fonts/roboto/Roboto-Medium.woff2 404 (Not Found)
o @ aos.min.js:1
r @ aos.min.js:1
(anonymous) @ aos.min.js:1
r @ aos.min.js:1
O @ aos.min.js:1
S @ aos.min.js:1
(anonymous) @ custom-script.js:1
j @ jquery-2.1.3.min.js:2
fireWith @ jquery-2.1.3.min.js:2
ready @ jquery-2.1.3.min.js:2
I @ jquery-2.1.3.min.js:2
aos.min.js:1 GET http://localhost:4200/assets/fonts/roboto/Roboto-Light.woff2 404 (Not Found)
o @ aos.min.js:1
r @ aos.min.js:1
(anonymous) @ aos.min.js:1
r @ aos.min.js:1
O @ aos.min.js:1
S @ aos.min.js:1
(anonymous) @ custom-script.js:1
j @ jquery-2.1.3.min.js:2
fireWith @ jquery-2.1.3.min.js:2
ready @ jquery-2.1.3.min.js:2
I @ jquery-2.1.3.min.js:2
aos.min.js:1 GET http://localhost:4200/assets/fonts/fontawesome-webfont.woff2?v=4.5.0 404 (Not Found)
o @ aos.min.js:1
r @ aos.min.js:1
(anonymous) @ aos.min.js:1
r @ aos.min.js:1
O @ aos.min.js:1
S @ aos.min.js:1
(anonymous) @ custom-script.js:1
j @ jquery-2.1.3.min.js:2
fireWith @ jquery-2.1.3.min.js:2
ready @ jquery-2.1.3.min.js:2
I @ jquery-2.1.3.min.js:2
about:1 GET http://localhost:4200/assets/fonts/roboto/Roboto-Medium.woff 404 (Not Found)
about:1 GET http://localhost:4200/assets/fonts/roboto/Roboto-Light.woff 404 (Not Found)
about:1 GET http://localhost:4200/assets/fonts/fontawesome-webfont.woff?v=4.5.0 404 (Not Found)
about:1 GET http://localhost:4200/assets/fonts/roboto/Roboto-Medium.ttf 404 (Not Found)
about:1 GET http://localhost:4200/assets/fonts/roboto/Roboto-Light.ttf 404 (Not Found)
about:1 GET http://localhost:4200/assets/fonts/fontawesome-webfont.ttf?v=4.5.0 404 (Not Found)

私はSOから可能な解決策をすべて試しましたが、何も助けませんでした

回答:

回答№1は2

CSSにインポートされたすべてのフォントに対して404エラー(見つかりません)が返されます。使用するかどうかを決定する必要があります。

  • Googleのフォント:HTMLファイルにインポートされます。
  • プロジェクトのローカルパスのフォント:CSSファイルで定義されています。

それらを組み合わせることはできますが、両方のオプションを表示しているので、修正できるように決定する必要があります。

最初のURLにエラーがあるかどうかを確認します。 http:// localhost:4200 / assets / fonts / ionicons.ttf?v = 2.0.0]1 ファイルをダウンロードするか、エラーを返します。

おそらく問題は、CSSファイルで定義されているパスにあります。たとえば src:url("../fonts/roboto/Roboto-Medium.eot");.


回答№2の場合は0

最後に、必要なdepファイルをgithubからダウンロードしてアセットフォルダーに入れた後、これを解決しました