Font Awesome 5:找不到图标 money-check

Font Awesome 5: Could not find icon money-check

我正在尝试使用 angular-fontawesome 加载图标 "money-check";但收到消息 FontAwesome: Could not find icon with iconName=money-check and prefix=fas 大多数其他图标都有效;一些我发现没有:

它们未在 upgrade guide 下重命名。

我的package.json:

"@fortawesome/angular-fontawesome": "0.1.0-10",
"@fortawesome/fontawesome-svg-core": "^1.2.0-11",
"@fortawesome/free-brands-svg-icons": "^5.1.0-8",
"@fortawesome/free-regular-svg-icons": "^5.1.0-8",
"@fortawesome/free-solid-svg-icons": "^5.1.0-8",

我的app.module:

import {fas} from '@fortawesome/free-solid-svg-icons';
import {faPlayCircle, faThumbsUp, faThumbsDown} from '@fortawesome/free-regular-svg-icons';

library.add(fas, faPlayCircle, faThumbsUp, faThumbsDown);

我的html: <fa-icon class="icon type" icon="money-check" size="lg"></fa-icon>

看看 icon's page: it was added in 5.0.13 - and you seem to be using 5.1.0-8. user-check 来自 5.1.0.11.

感谢@MBaas 为我指明了正确的方向。我正在按照 angular-fontawesome page 上的说明进行操作;现在恢复到常规字体 awesome 安装。这是修复它的 package.json:

"@fortawesome/angular-fontawesome": "0.1.0-10",
"@fortawesome/fontawesome": "^1.1.8",
"@fortawesome/fontawesome-free-brands": "^5.0.13",
"@fortawesome/fontawesome-free-regular": "^5.0.13",
"@fortawesome/fontawesome-free-solid": "^5.0.13",
"@fortawesome/fontawesome-svg-core": "^1.2.0-11",

我遇到了同样的问题,我解决了这个问题添加 library.add() 并在相应的行中导入必要的图标,在你的情况下想要你的 app.module.ts 中的下一个代码:

从'@fortawesome/free-solid-svg-icons'导入{fas , faMoneyCheck}; 从“@fortawesome/free-regular-svg-icons”导入 {faPlayCircle、faThumbsUp、faThumbsDown};

library.add(fas, faPlayCircle, faThumbsUp, faThumbsDown , faMoneyCheck);

希望对你有所帮助,谢谢,请原谅我的英语不好。

正如我所见,您的 html 是错误的。 你有

<fa-icon class="icon type" icon="money-check" size="lg"></fa-icon>

但应该是:

<fa-icon class="icon type" [icon]="faMoneyCheck" size="lg"></fa-icon>

检查[图标]=

另外,需要导入那个