Pro FontAwesome icons 'Could not find icon'

Viewed 685

Followed instructions here:

https://fontawesome.com/how-to-use/on-the-web/setup/using-package-managers

to setup Pro icons and here:

https://fontawesome.com/how-to-use/on-the-web/using-with/angular

to use in Angular 6

Works fine when I only use the free icons.

In Module:

import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';

In component.ts:

import { faHandshake } from '@fortawesome/free-solid-svg-icons'
export class EntityUserComponent implements OnInit {
    faHandshake = faHandshake;

In component.html:

<fa-icon [icon]="faHandshake"></fa-icon>

BUT when I try to access it, or any other icon, from:

import { faHandshake } from '@fortawesome/fontawesome-pro'

The icon doesn't appear and in the console, I get:

FontAwesome: Could not find icon. It looks like you've provided a null or undefined icon object to this component.

I've read FontAwesome Icons in Angular 6? but don't think the OP's solution applies to me, as I think this may be a Pro issue (although not sure what VS is!) and am keen to try and do it the 'proper' way if possible. Any pointers gratefully received.

0 Answers
Related