Code produced after rendering an ionic-item-sliding seems weired


#1

Hello
I have the following plunker

plunker with ion-item-sliding

I would like to ask why all this dom code , shown in the screenshot below, is produced?

I don’t have any inputs, but a div with an input-wrapper class is generated.
More over, everything in the item gets inside an ion-label.

Is it a wrong use from my side that is causing it, or this is how it happens by design?

Thanks


#2

Nope you haven’t done anything wrong. This is how the markup is rendered out.

ion-item has a pretty complex template,

https://github.com/driftyco/ionic/blob/2.0/ionic/components/item/item.ts#L44


#3

Thanks for the answer.
Is there a way to use my template in ionic elements?


#4

Only if you were to create your own component and extend the ion-item, but I wouldn’t really suggest that


#5

Since you don’s suggest using my own component, what solution you suggest to the following use case?
In an ion-item I want to use an image after the item’s label and before an input
I have made a plunker that demonstrates the case and the problem I face (the image is not rendering):

Image in an ion-item plunker

thanks!