【发布时间】:2017-04-12 18:46:38
【问题描述】:
我已经构建了我的 Angular2 应用程序,一切正常。现在我包含了 font-awesome,当我捆绑应用程序时,它给出了图片中显示的错误。无法加载 woff 和 woff2 文件。 我的样式如下所示 -
"styles": [
"styles.css",
"../node_modules/font-awesome/css/font-awesome.css",
"../node_modules/primeng/resources/primeng.min.css",
"../node_modules/primeng/resources/themes/omega/theme.css",
"../node_modules/fullcalendar/dist/fullcalendar.css",
"../node_modules/bootstrap/dist/css/bootstrap.min.css"
],
【问题讨论】:
-
图片在哪里?
-
刚刚更新了。
-
你必须在你的问题中包括你如何在你的模块中导入它,否则人们无能为力。
-
按照建议,我将它包含在我的“样式”中:[“../node_modules/font-awesome/css/font-awesome.css”,]。当我发球时它工作正常。控制台中不会引发错误。仅当我在 IIS 上进行构建和手动部署时才会出错。
-
用我的 angular-cli.json - Styles 属性更新了问题。
标签: angular angular-cli font-awesome-5