Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Font awesome 5 (SVG) with AngularJS

I'm using font awesome version 5, with AngularJS. It's looking great, and it's replacing icons as expected. However, the problem i'm having is if a dom element is added AFTER the page has finished loading, it doesn't know to replace the relevant .fa-* element, with an SVG.

Surely there is a way around this, but I can't seem to find any information on this specific issue.

like image 461
Dallby Avatar asked Oct 28 '22 20:10

Dallby


1 Answers

You can still use the old style Web Fonts in FontAwesome 5.

https://fontawesome.com/get-started/web-fonts-with-css

<head>
  <!--core first + styles last-->
  <link href="/static/fontawesome/fontawesome-all.css" rel="stylesheet">
</head>
<body>
  <!--user icon in two different styles-->
  <i class="fas fa-user"></i>
  <i class="far fa-user"></i>
  <!--brand icon-->
  <i class="fab fa-github-square"></i>
</body>
like image 164
Jeff Baier Avatar answered Nov 03 '22 07:11

Jeff Baier