Questions tagged [angular-fontawesome]

Questions about @fortawesome/angular-fontawesome library to support FontAwesome 5 in Angular applications.

Source code and examples for @fortawesome/angular-fontawesome library can be found on GitHub here.

70 questions
56
votes
4 answers

Font Awesome 5 with Angular

How do I use font-awesome 5 with Angular (2+)? I've tried adding this inside a component: import {faChevronLeft, faChevronRight} from '@fortawesome/fontawesome-free-solid'; import fontawesome from '@fortawesome/fontawesome'; ... constructor(){ …
JeB
  • 11,653
  • 10
  • 58
  • 87
17
votes
4 answers

Import all icons from Fontawesome

I using Fontawesome 5 in my Angular project in this way: import fontawesome from '@fortawesome/fontawesome'; import { faBold, faItalic, faUnderline } from '@fortawesome/fontawesome-free-solid'; and in contructor: fontawesome.library.add(faBold,…
13
votes
1 answer

Include @fortawesome/fontawesome to angular-cli project

I'm trying to include font awesome 5 to my angular-cli project (1.6.0) running Angular >5.0.0. I used (as described): yarn config set @fortawesome:registry https://npm.fontawesome.com/xxxxx-xxxx-xxx-xxx-xxxxxxx yarn add @fortawesome/fontawesome yarn…
petur
  • 1,366
  • 3
  • 21
  • 42
7
votes
3 answers

How to assign the correct type to an item interface that imports a fontawesome icon

I have an angular 11 project in development that uses angular-fontawesome and angular material icon. It contains a 'problem' model with an optional 'icon' property: string;'. The data constant "problem " contains an arrangement of several "problem "…
6
votes
3 answers

Using CSS Pseudo-elements with Angular Font awesome problem

I have installed @fortawesome/angular-fontawesome - from here - https://www.npmjs.com/package/@fortawesome/angular-fontawesome into my Angular 7 application. I can use the icon using but i cannot find a way to add them through CSS. I am trying to…
user9791525
  • 91
  • 1
  • 5
6
votes
2 answers

Fontawesome 5 with Angular 2+

I don't know how to include FontAwesome 5 to Angular 2+ app. I found this package - https://www.npmjs.com/package/@fortawesome/fontawesome Could you tell me where should I import this package? Maybe in app.module.ts file?
bartekgorski
  • 124
  • 2
  • 7
5
votes
1 answer

FaIconLibrary not found when using angular-fontawesome and font-awesome 5

I have the following error when trying to use @fortawesome/angular-fontawesome in my angular 7 application: node_modules/@fortawesome/angular-fontawesome/angular-fontawesome"' has no exported member 'FaIconLibrary I followed the documentation and…
Thierry Templier
  • 198,364
  • 44
  • 396
  • 360
4
votes
0 answers

FontAwesome Pro icons not showing in Angular project

I am building Angular 8 App. We have font awesome pro license and I have followed the instructions from the following URL: https://fontawesome.com/how-to-use/on-the-web/setup/using-package-managers In my package.json: "devDependencies": { …
Ragavan Rajan
  • 4,171
  • 1
  • 25
  • 43
3
votes
4 answers

Angular - FontAwesome Dependencies missing error

I am trying to install Font Awesome in my angular project. Installed using the following command in terminal ng add @fortawesome/angular-fontawesome@0.6 It installed successfully. Now it is giving dependency error. The target entry-point…
Saad Bashir
  • 4,341
  • 8
  • 30
  • 60
3
votes
1 answer

Updating from one to another doesn't consistently update the icon

I have been trying to make a form for blog posting, and I want to have selectable category icons next to the title. I made a form with selectable font awesome icons, but when I select a category I can't select another one to change the icon again.…
3
votes
1 answer

angular-fontawesome + FaIconLibrary + Angular + Storybook.js = :(

Simply would like to use angular-fontawesome with Storybook.js as a library (FaIconLibrary). In the following documentation https://github.com/FortAwesome/angular-fontawesome/blob/master/docs/usage/icon-library.md#using-the-icon-library i'm to add a…
Adam L
  • 177
  • 1
  • 1
  • 9
3
votes
1 answer

How to dynamic load fontawesome icon by iconName and prefix?

I investigated the problem for dynamic load of fontawesome icon by iconName. But the code is not working. What is the reason? What is the best practice? And why I need the call for ngOnChanges() in the directive ngOnInit() hook? The error I get in…
3
votes
2 answers

How do I use angular-fontawesome with Angular Material?

Existing questions on this subject refer to how to use Angular with FontAwesome Icons and the Answer is ideally Angular FontAwesome. I searched both repo's and didn't really find much using angular-fontawesome. There are hints of older solutions…
user1059939
  • 1,613
  • 2
  • 20
  • 37
3
votes
2 answers

Angular (click) not working with Font Awesome 5 via CDN

I'm using Angular CLI in a small project and Fontawesome 5 via CDN for icon styling. Came across this issue when I was applying fontawesome 'styling' classes to some buttons and links. , or elements have different behaviours when they…
2
votes
1 answer

How do you set the size of FontAwesome icon using CSS in Angular?

Per FontAwesome Usage Guide, you set the size of icons like so: 1. 2.
Mario Garrido
  • 117
  • 2
  • 8
1
2 3 4 5