[Vuejs]-How to display a default fontawesome icon when icon is not registered ? (Vue, Angular or React)

3👍

Can you give a try to this work around. You can replace the unknown/invalid font awesome with any content (text/image).

Live Demo :

.fa:before {
  font-family: "Font Awesome 5 Free";
  content: "\f00d";
}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" >

<i class="fa fa-questionnnn"></i> <!-- Here I am just adding the wrong icon name and it will get replaced by the content mentioned in the CSS. -->
<i class="fa fa-question"></i>

Leave a comment