How to use fontawesome without 'fa-icon' tag

Viewed 516

Fontawesome-angular can be used via the following tag:

<fa-icon [icon]="['fal', 'info-circle']"></fa-icon>

In some cases - like the primeng accordion - the default icon can be replaced by setting css classes. Is there a way to access the fontaweome svg images by providing the names as classes without the fa-icon tag?

Something like this:

<i class="fal fa-info-circle"></i>
2 Answers

Demo add this to index.html

<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.1/js/all.min.js"></script>

I think there is a typo in the class name.. Try this..

<i class="fas fa-info-circle"></i>
Related