4
votes

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!?

2
how could you just use in icon in ts file - madhavsai bhushan
You are importing but are you using it anywhere? - Ramesh Reddy

2 Answers

8
votes

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>
1
votes

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