How to add icon before label of toggle


#1

Hi,

I’m having problems in putting an Icon just before the label on a toggle elemenet.

I have the following:

<ion-item>
	<ion-label><ion-icon name="star"></ion-icon>Label</ion-label>
	<ion-toggle checked="false"></ion-toggle>
</ion-item>

This works but as soon as I put my custom icon everything gets break.
What I want is just the example of the “Airplane Mode” on this page:

Thanks


#2

This has to do with it being a custom icon.

ion-icon has some code underneath it to make sure it loads the appropriate icon for both ios and md. You would need to create a class for your custom icon that fits for ios and md.