我如何在Angle中使用品牌Fontawesome图标 [英] How do i use brand fontawesome icon in angular

查看:79
本文介绍了我如何在Angle中使用品牌Fontawesome图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在组件中使用字体超棒的品牌图标我尝试导入它,但是没有任何图标.

I can't use font awesome brand icons in my component I try to import it, but there is't any icons.

import {faTelegram} from "@fortawesome/angular-fontawesome"; // Has no exported member

但是我们可以看到fontawesome-5中提供了品牌图标 https://fontawesome.com/icons/telegram?style=brands

But as we can see brand icon is available in fontawesome-5 https://fontawesome.com/icons/telegram?style=brands

我如何使用此图标!?

推荐答案

帮自己一个忙,至少阅读文档的第一页.

Do your self a favor, at least read the doc's first page.

品牌是从

'@fortawesome/free-brands-svg-icons' // or pro-brands-svg-icons

文档(第一页)有一个深入的使用示例

The documentation (first page) has an in depth usage example

import { faTwitter } from '@fortawesome/free-brands-svg-icons';

// Add an icon to the library for convenient access in other components
library.add(faTwitter);


<fa-icon [icon]="['fab', 'twitter']"></fa-icon>

这篇关于我如何在Angle中使用品牌Fontawesome图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆