gpt4 book ai didi

ionic2 - 从 ionic2 中的 Assets 文件夹加载字体时出错

转载 作者:行者123 更新时间:2023-12-05 07:44:01 26 4
gpt4 key购买 nike

while developing an ionic app I used some icons and images.The issue is now my app is not displaying icons properly .got these errors in the console

Failed to load resource: the server responded with a status of 404 (Not Found)----ionicons.woff2

these error exists for 'roboto-medium.ttf','roboto-regular.ttf','ionicons.woff','ionicons.woff','roboto-regular.woff '

 localhost:portnumber/build/assets/fonts/roboto-light.ttf 404 (Not Found)

I didn't even use any of the fonts in my app,but why is this affecting in displaying icons

  • Cordova CLI:6.5.0
  • ionic 框架版本:2.0.0
  • Ionic CLI 版本:2.2.1
  • Ionic 应用程序库版本:2.2.0
  • Ionic 应用脚本版本:1.0.0
  • ios-deploy 版本:未安装
  • ios-sim 版本:未安装
  • 操作系统:Linux 3.13
  • 节点版本:v7.7.2
  • Xcode 版本:未安装

i have cross checked with my previous copy of the same app,found that the path in main.css file for @font-face is changed to assets/fonts/ionicons.woff2 from ../assets/fonts .I think this is the root cause ,but i tried to change it,after runing the app the changes were not applied.how to resolve this issue.

最佳答案

after a lot of struggling ,i found the solution .That is to make changes in variable.scss file in "theme" folder .chaning the path of a variable $font-path sloved all the issue.$font-path: "../assets/fonts";

关于ionic2 - 从 ionic2 中的 Assets 文件夹加载字体时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43233069/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com