2016-08-23 9 views
0

に動作していない角、材料のMD-アイコンの代わりに、Iタグを使用している間、私はMaterial Design Icon セルフホスティングの手順に従いました。マテリアルデザインのアイコン - MD-アイコンタグは、Mozilla Firefoxの

Google ChromeとInternet Explorer 9でコードが円滑に実行されている間に、Mozilla Firefox 48.0.1でコードを実行する際に問題が発生しています。

Firefoxを使用している間、コンソールログには、少なくとも3回については、以下のメッセージを示しています。

downloadable font: download failed (font-family: "Material Icons" style:normal weight:normal stretch:normal src index:2): bad URI or cross-site access not allowed source: file:///D:/Atom%20Projects/kenobi/node_modules/material-design-icons/iconfont/MaterialIcons-Regular.woff2 

その他の詳細:

マイHTML

<!DOCTYPE html> 
<html> 
    <head> 
    <link rel="stylesheet" href="../node_modules/angular-material/angular-material.min.css"> 
    <link rel="stylesheet" href="../node_modules/material-design-icons/iconfont/material-icons.css"> 
    <script src="../node_modules/angular/angular.min.js"></script> 
    <script src="../node_modules/angular-material/angular-material.min.js"></script> 
    <script src="../node_modules/angular-aria/angular-aria.min.js"></script> 
    <script src="../node_modules/angular-animate/angular-animate.js"></script> 
    <script src="../app/test-package/test.js"></script> 
    </head> 

    <body ng-app="TestModule"> 
    <md-icon class="material-icon" style="color: #000000;">face</md-icon> 
    <md-radio-button 
    </body> 

</html> 

マイをJavascript

var app = angular.module("TestModule", ["ngMaterial"]); 

---------------------------------- EDIT --------- -------------------------

同じエラーが3回表示されますが、次のように表示されていない:

downloadable font: download failed (font-family: "Material Icons" style:normal weight:normal stretch:normal src index:2): bad URI or cross-site access not allowed source: file:///D:/Atom%20Projects/kenobi/node_modules/material-design-icons/iconfont/MaterialIcons-Regular.woff2 

downloadable font: download failed (font-family: "Material Icons" style:normal weight:normal stretch:normal src index:3): bad URI or cross-site access not allowed source: file:///D:/Atom%20Projects/kenobi/node_modules/material-design-icons/iconfont/MaterialIcons-Regular.woff 

downloadable font: download failed (font-family: "Material Icons" style:normal weight:normal stretch:normal src index:4): bad URI or cross-site access not allowed source: file:///D:/Atom%20Projects/kenobi/node_modules/material-design-icons/iconfont/MaterialIcons-Regular.ttf 
+0

ローカルにアプリケーションをホストしているのか、htmlファイルを開いているだけですか? – Alok

+0

@AlokブラウザでHTMLファイルを開くだけです –

+0

ああ!それはあなたの問題かもしれません。私は専門家ではありませんが、ファイルをダウンロードしようとするとブラウザはXSS攻撃として他のファイルを扱うことを伝えます。ノード内の角型アプリケーションをホストするか、またはgrunt watchを使用してみてください。 – Alok

答えて

0

あなたの問題の詳細については、this answerを参照してください。問題を解決するには、角度のあるアプリケーションをホストします。私はGruntを時計で使用することを提案します。セットアップとスタートが簡単で、ライブリロードも可能です。ここで詳しく読むことができます:Grunt Watch

実際のアプリケーションと同じレベルで動作するようにアプリケーションをホストすることをお勧めします。

関連する問題