简体   繁体   中英

How do i use brand fontawesome icon in angular

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

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

How do i use this icon!?

There are so many ways to use FontAwesome in Angular, I suggest you use npm, which is the official guide. Link here

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

Brands are imported from

'@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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM