FortAwesome / angular-fontawesome

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

Cannot bind 'icon' since it isn't a known property of 'fa-icon' #211

Closed kuehlc closed 4 years ago

kuehlc commented 4 years ago

I am explicitly using angular fontawesome 0.6.0, and it seems to not be working for a component that I have. It works in another one that is declared in the app module, but not a component that is in a module that was imported to app module. I may just be crazy and missing something simple, but it looks almost the same, and I don't see why it isn't working. viewercomponent appmodule viewermodule headercomponent sharedmodule viewerhtml headerhtml

kuehlc commented 4 years ago

I works in the header, but not in viewer if that wasn't clear from the initial post.

devoto13 commented 4 years ago

You need to add FontAwesomeModule to imports array of the module where your component is present in the declarations array for Angular to know about fa-icon component.

kuehlc commented 4 years ago

I have Fontawesome in shared module which is in viewer as well though

kuehlc commented 4 years ago

Viewer component is in viewer module which has SharedModule imported

kuehlc commented 4 years ago

Exporting it from sharedmodule made it work.