Install flag-icon-css into ionicv3/v4


#1

hi there,

i try to get flag-icon-css into my ionicv3/v4 project, but i don’t know the missing steps.

I had installed it via npm install flag-icon-css --save and try to import it on page.component via
import * as flag-icon-css from 'flag-icon-css'

But i only get the error, that there is no module name flag-icon-css.

How did you do that? I think many people here are using this.
So please help a little newbie :wink:


#2

You just have to copy the css file before using it (do not use the import).

Here is a good tutorial : https://zerone-consulting.blog/2017/10/10/steps-to-include-custom-cssjs-files-in-ionic-3/


#3

working! thank you!

was really easy:

this into index.html
<link rel="stylesheet" href="assets/css/flag-icon.css">

and than just 2 folders (flags and css) into assets. Thats it!