Reputation: 5703
I have implemented font awesome icons in my ionic3 app, but it does not show up. My ionic project environment details,
cli packages: (C:\Users\acer\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
local packages:
@ionic/app-scripts : 3.1.8
Ionic Framework : ionic-angular 3.9.2
System:
Node : v8.4.0
npm : 5.8.0
OS : Windows 10
Misc:
backend : pro
this is my intro.html file,
<ion-slides pager>
<ion-slide style="background-color:yellow" >
<i class="fas fa-utensils" style="font-size:120px;color:#ebebeb" aria-hidden="true"></i>
</ion-slide>
</ion-slides>
this is in my index.html file
<!-- font-awesome -->
<link href="/assets/css/font-awesome.min.css" rek="stylesheet" type="text/html">
I have already added following code, as many blog posts and SO answers suggested in my copy.config.js file
copyFontawesomeFonts: {
src: ['{{ROOT}}/node_modules/font-awesome/fonts/**/*'],
dest: '{{WWW}}/assets/fonts'
},
copyFontawesomeCss: {
src: ['{{ROOT}}/node_modules/font-awesome/css/font-awesome.min.css'],
dest: '{{WWW}}/assets/css'
},
Upvotes: 0
Views: 1745
Reputation: 3
I have faced this issue earlier. Resolved it by loading css file from below url instead of loading from assets.
Upvotes: 0
Reputation: 1466
If you are linking a css-stylesheet its type should always be
type="text/css"
Change it from
<!-- font-awesome -->
<link href="/assets/css/font-awesome.min.css" rek="stylesheet" type="text/html">
to
<!-- font-awesome -->
<link href="/assets/css/font-awesome.min.css" rek="stylesheet" type="text/css">
Upvotes: 1
Reputation: 1076
You have syntax error in linking stylesheet
<link href="/assets/css/font-awesome.min.css" rek="stylesheet" type="text/html">
It should be
<link href="/assets/css/font-awesome.min.css" rel="stylesheet" type="text/css">
Upvotes: 1