Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can angular cli use flag icon css?

I am beginner in angular cli and I was wondering: can I use this https://github.com/lipis/flag-icon-css in package.json because when there is an update it's more easy to update automatically and I don't have to do it manually. And is it a problem that Flag icon are SCSS and I use SASS in my angular 2 project?

like image 656
Panaiot Panaiotov Avatar asked Feb 16 '17 13:02

Panaiot Panaiotov


People also ask

How do I add a country flag in HTML?

The stick and the flag should be inline so we make the wrapper div's display property to flex. And add some height, width, background-color, border styles to the stick, and in the flag, add height, width, box-shadow, background-color, and position properties.


1 Answers

Installation:

npm install flag-icon-css --save

Updating the styles section in the angular.json file (if you use Angular < 6.0.0 - then angular-cli.json):

"styles": [
    "node_modules/flag-icon-css/css/flag-icon.min.css",
    .....
],

Use in templates:

<span class="flag-icon flag-icon-ru"></span>
like image 75
progm Avatar answered Oct 13 '22 19:10

progm