3

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,

BigJobbies
  • 3,633
  • 11
  • 43
  • 66

2 Answers2

1

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.

Adil Sarwar
  • 122
  • 1
  • 10
1

I faced the same problem migrating from Ionic 2 beta to 2.0.0-rc.5. After looking into the starter tutorial source code, I realized that src/theme/variables.scss was missing this import:

@import "ionicons";