In this post, we will learn how to add font awesome icons in angular 10. you can see use font awesome icons in angular 10. This article goes in detailed on angular 10 install font awesome icons. This article will give you simple example of how to install font awesome in angular 10. Here, Creating a basic example of font awesome icons in angular 10.
let's see step by step explain how to add font awesome icons in angular 10. Let's get started with use font awesome icons in angular 10.
Icons is a basic requirement of each project. icons indicate more, you don't need to write label for it. icons also make beautiful layout of our application. If you think to use icons in your application then you will always prefer to use font awesome icons. font-awesome provide lots of icons and you can use it very easily.
So, i think example, i will learn how to install font awesome icons in angular 10 application step by step. it's very simple but, for new developer that can understand how it you can do it.
Step 1: Create New App
You can easily create your angular app using bellow command:
ng new my-new-app
Step 2: Install font-awesome
In this step, you need to just install font-awesome on your angular 10 and import css file to style.css file. this is only for css importing. so you can run command bellow:
npm install font-awesome --save
Step 3: Import CSS
After successfully, installed font-awesome, we need to import css files on angular.json file. so let's add following lines on it.
OR, you can also give path like as this way, if above is not working:
Step 4: Use Font Awesome Icons
Now we are ready to use font awesome classes in our html file. so let's add following code on your app.component.html file.
<h1>Angular 10 Install Font Awesome Icons Example - HDTuto.com</h1>
<i class="fa fa-user fa-5x"></i>
<i class="fa fa-dashboard fa-5x"></i>
<i class="fa fa-money fa-5x"></i>
<i class="fa fa-home fa-5x"></i>
<i class="fa fa-th fa-5x"></i>
You can run application.
You will see layout as like bellow:
You can also use icons from here: Font Awesome Icons List.
I hope it can help you...
Do you like below Tutorials ?
- PHP Laravel 5.5 - import export data into excel and csv using maatwebsite
- Laravel 7.x and 6.x create custom facade example from scratch
- Node JS - Get Real time online users counter using socket io example
- PHP Laravel 7.x and 6.x - Bootstrap Admin Theme Integration example from scratch
- MySQL Query - How to select records of today to next Sunday ?
- Laravel 7.x and 6.x - username custom validation example
- Laravel 5.5 - Import Extract zip file using chumper/zipper package
- PHP Laravel Set Custom Validation Error Messages Example