Using a custom component in an ion-item


#1

I have a custom element component that is a child of a ion-item and the html of my custom component is not appearing therefore not being able to use it unless it’s outside the ion-item.

HTML looks like this:

<ion-item>
    <ion-label stacked>City</ion-label>
    <input-tag-search type="area" subtype="city"></input-tag-search>
</ion-item>

input-tag-search is a button and the button should be inside the ion-item, but instead, the view shows nothing.

Any ideas?


#2

You must give it an attribute of item-content, item-left or item-right. More info here.


#3

Thanks. Setting an item-content attribute on my component fixed the issue!