<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" integrity="sha512-9usAa10IRO0HhonpyAIVpjrylPvoDwiPUiKdWk5t3PyolY1cOd4DSE0Ga+ri4AuTroPR5aQvXU9xC6qOPnzFeg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
# use this in the head section of html to apply the font awesome icons.
<head>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css"/>
</head>
use the link for free icons from font awesome -> https://fontawesome.com/v5.15/icons?d=gallery&p=2&m=free
<script src="https://kit.fontawesome.com/4ea6e3ab0b.js" crossorigin="anonymous"></script>
/* Add to head, this script is from font-awesome.icon */
<script
src="https://kit.fontawesome.com/5daa8eb347.js"
crossorigin="anonymous"
></script>
/* Add to body */
<i class="fa-solid fa-magnifying-glass"></i>
/* Add style to your css */
.fa-solid {
vertical-align: top;
font-size: 16px;
border: 1px solid red;
color: white;
padding: 5px;
}
<i class="fa fa-envelope-o" aria-hidden="true"></i>
$ npm install @fortawesome/fontawesome-svg-core
$ npm install @fortawesome/free-solid-svg-icons
# See Compatibility table below to choose a correct version
$ npm install @fortawesome/angular-fontawesome@<version>