After changing my pages to be lazy loaded (via @IonicPage with separate modules) all ionicons dissapeared. When declaring the components directly in app.module.ts, everything works fine.
I did find a workaround using web components, but it's pretty cumbersome and I still think this is either a bug or I did not know how to import the proper module or didn't create the structure as it was supposed to.
This is how I use the ionicons:
<button [navPush]="'admin'" ion-button icon-end>
Admin
<ion-icon name="star"></ion-icon>
</button>
- Broken version: https://github.com/ScaleIT-Org/ionic-app-skeleton/tree/ionicon-broken
- "No lazy load" working version: https://github.com/ScaleIT-Org/ionic-app-skeleton/tree/ionicon-fix-no-lazy-load
- Fixed (workaround #499) version: https://github.com/ScaleIT-Org/ionic-app-skeleton/tree/ionicon-workaround-fix
Icon not visible anymore after switching to separate modules and @IonicPage Component:
I also created an issue with all the details: https://github.com/ionic-team/ionicons/issues/526
My question is: Do we need to explicitly import the ionicons as a module in the code? If so, how can I do that.
Any help much appreciated, thank you in advance.