I would like to use our own custom svg icons in an ion-icon component.
I found this article https://medium.com/@JordanBenge/how-to-create-custom-ionic-4-icons-af80cc6cc148 but it is based in angular.
Is there any documentation for doing this with Vue?
See my post here
Thanks @sdetweil,
I found that just supplying the path to the svg works to add a custom icon.
Is there a reason not to do it this way. It seems very simple compared to creating a custom component.
No, your way is easiest!
Can you show me how to do this that works when the project is compiled for production? I did like this
<ion-icon src="src/assets/img/charity.svg"></ion-icon>
and the icon will only appear when I run ionic serve but not when I compiled my project using ionic build --prod.
Here’s what works in my project. I have a custom icon at:
/public/assets/icons/checkbox-custom.svg
And ion-icon is set like this:
<ion-icon src="/assets/icons/checkbox-custom.svg" />