Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic 2 Beta blank project not showing ionicons

I recently installed the Beta of Ionic 2 by typing the following

ionic start myproject blank --v2 --ts

which is going fine, going through the ionic 2 documentation, i want to add some icons using the code provided, like so

<ion-icon name="add-circle"></ion-icon>

But when i view my project, it either shows just a black box, or nothing at all.

My package.json file also includes the following line

"ionicons": "3.0.0",

Im not sure what im missing,

Any help would be greatly appreciated.

Cheers,

like image 597
BigJobbies Avatar asked Feb 19 '26 16:02

BigJobbies


1 Answers

Alright, I had this problem as well and I just found out the solution. Make sure you have ionicons installed.

If not installed add the following to your package.json dependencies:

ionicons": "3.0.0" and run npm update


After that, add this in your app.core.scss file in under app/theme folder.

@import "/node_modules/ionicons/dist/scss/ionicons";

Hope it helps.

like image 102
Adil Sarwar Avatar answered Feb 23 '26 09:02

Adil Sarwar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!