FortAwesome / angular-fontawesome

Official Angular component for Font Awesome 5+
https://fontawesome.com
MIT License
1.49k stars 152 forks source link

icon not shown! #275

Closed calidion closed 4 years ago

calidion commented 4 years ago

Describe the problem

icon not shown!

error info:

'fa-icon' is not a known element:
1. If 'fa-icon' is an Angular component, then verify that it is part of this module.
2. If 'fa-icon' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

What did you expect?

icon shown.

Reproducible test case

devoto13 commented 4 years ago

It's a standard Angular error. As a starting point please make sure that you have added FontAwesomeModule to imports of the module where the component you want to add fa-icon to is declared.

See here for more details.

calidion commented 4 years ago

@devoto13

It is added.

You can check it here

calidion commented 4 years ago

added in app.module.ts

devoto13 commented 4 years ago

imports of the module where the component you want to add fa-icon to is declared.

HomeComponent is declared in the HomeModule, not AppModule: https://github.com/calidion/trojan-desktop/blob/master/src/app/home/home.module.ts#L10