Angular 7 - Flag Icon CSS
In this article, we'll see how to setup Flag Icon CSS in Angular 7.

🎬Video version: https://www.youtube.com/watch?v=JnX6hgWNnb8
Step 0
Installing angular-cli
Note: you can skip this part if you already have application generated
sudo npm i -g @angular/cli@next
ng new angular7app
cd angular7app
Step 1
Install
flag-icon-css
npm install flag-icon-css --save
Step 2
Open
angular.json
and insert a new entry into the styles array:
"styles": [
"node_modules/flag-icon-css/css/flag-icon.min.css",
"styles.css",
],
Step 3
Open
src/app/app.component.html
and add:
<span class="flag-icon flag-icon-gr"></span>
Step 4
Launch the application:
ng serve -o

Last updated
Was this helpful?