Ionic version:
$ ionic -v
3.17.0
I'm submitting a ...
[x] bug report
[ ] feature request
Current behavior:
In my html i have:
<ion-icon name="add"></ion-icon>
which gets rendered as:
<ion-icon name="add" role="img" class="icon icon-md ion-null-add" aria-label="null add" ng-reflect-name="add"></ion-icon>
This icon is not shown.
I guess this is because of the ion-null-add class. If i replace it (Developer Tools HTML) with ion-md-add it shows fine.
Code samples
I tried replicating it in a Plunkr, but there it works fine.
Other information:
There is this comment having the same issue. (I was afraid a comment in a closed bug report might get overlooked).
I can observe same behaviour with ionic serve and ionic cordova run android --device.
At first installation the icons were shown correctly. At some point (maybe updating some package) they vanished (html code staying the same). In a similar vain downloading any starter template shows icons correctly.
Ionic info:
$ ionic info
cli packages: (d:\Program Files\nodejs\node_modules)
@ionic/cli-utils : 1.17.0
ionic (Ionic CLI) : 3.17.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.0.1
Cordova Platforms : android 6.3.0
Ionic Framework : ionic-angular 3.8.0
System:
Android SDK Tools : 26.1.1
Node : v6.11.4
npm : 3.10.10
OS : Windows 8.1
Environment Variables:
ANDROID_HOME : D:\Program Files\Android\AndroidSDK
Misc:
backend : pro
Hello! Thank you for opening an issue with us! Would you be able to provide a sample application via GitHub that demonstrates the issue you are having? Thanks for using Ionic!
Found someone having a "solution": https://forum.ionicframework.com/t/ion-icon-produce-ion-null-icon-resolved/93308/4
Working on a sample app...
Ok i fixed it after getting a pointer from above mentioned link.
I had IonicModule.forRoot(...) in components.module.ts imports: [...] where it should only be IonicModule.
Sorry for the noise.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Most helpful comment
Ok i fixed it after getting a pointer from above mentioned link.
I had
IonicModule.forRoot(...)incomponents.module.tsimports: [...]where it should only beIonicModule.Sorry for the noise.