question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: Ionicons are no longer displayed after updating to Ionic 5

See original GitHub issue

Bug Report

Ionic version: [x] *5.0.0-rc.2

Current behavior: Using the last release of Ionic (4.11.7) all ionicons are displayed but when I upgrade to 5.x I have no more icons loaded.

I checked in www/svg folder I have the icons prefixed by ios- and md- like as for ionic 4.x but when I brose the mobile app using my browser (ionic serve), I can see that requests are done to get the svg files without any prefix. with ionic 4 the request is done for the sema resource adding the “md-” prefix.

Html in template file:

<ion-icon name="person" item-start></ion-icon>

Html of generated icon is the same for ionic 4 / 5:

<ion-icon _ngcontent-osv-c1="" item-start="" mode="md" name="person" ng-reflect-mode="md" ng-reflect-name="person" role="img" class="md hydrated" aria-label="person"></ion-icon>

BR,

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
js-devilcommented, Apr 29, 2020

If you are using ionic/vue with Ionic 5 and ionicons don’t show. Try doing this

Do this to use ionicons in Ionic 5

import { iosEye, mdEye } from "ionicons/icons";
import { addIcons } from "ionicons";

addIcons({
  "ios-eye": iosEye,
  "md-eye": mdEye
});

In the HTML <ion-icon name="eye"></ion-icon>

0reactions
ionitron-bot[bot]commented, Jun 9, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ionicons upgrade from v4 to v5 resulting in not displaying ...
METHOD 1. Try to run: cordova clean. and retry. If not work follow method two. METHOD 2. try to run: ionic cordova platform...
Read more >
Ionic App Troubleshooting - Updating Ionic Packages
Updating Ionic's packages; Adding third party libs; Blank App; Directive Not Working; Click Delays; Common mistakes. Forgetting Parentheses on a Decorator ...
Read more >
Ionicons Usage Guide
Usage. Ionicons is a completely open-source icon set with 1,300 icons crafted for web, iOS, Android, and desktop apps. Ionicons was made for...
Read more >
Ionic 4 > Ionic 5 Project Upgrade
Note that the option of creating new apps with the Ionic 4 framework was removed and we no longer support the projects that...
Read more >
Custom SVG Icons in Ionic with Ionicons
IMPORTANT: If you are using the script above to add Ionicions to a non-Ionic project, make sure you are including the latest version...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found