ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

custom angular component is not rendering in an <ion-item>

Open jalef opened this issue 10 years ago • 7 comments

A custom angular component is not rendering in an element

When I use a custom angular component in an I expect it to be rendered

Steps to reproduce:

  1. Create a custom angular component
  2. Place it in an ion-item

Which Ionic Version? 2.0.0-beta.3

Plunker that shows an example of your issue

http://plnkr.co/edit/CDKeuGkZUIcXQQoLylD0?p=preview

Run ionic info from terminal/cmd prompt: (paste output below) Cordova CLI: 5.4.1 Gulp version: CLI version 3.9.0 Gulp local: Local version 3.9.1 Ionic Version: 2.0.0-beta.3 Ionic CLI Version: 2.0.0-beta.23 Ionic App Lib Version: 2.0.0-beta.13 OS: Node Version: v4.2.4

jalef avatar Apr 19 '16 10:04 jalef

Does this help? http://plnkr.co/edit/GB8EVkwd9ESCI8HacmJq?p=preview

dylanvdmerwe avatar Apr 19 '16 11:04 dylanvdmerwe

thanks for the answer, but this is not my use case. I updated the plunker so it is more evident what I need http://plnkr.co/edit/CDKeuGkZUIcXQQoLylD0?p=preview

jalef avatar Apr 19 '16 12:04 jalef

Ok try this? http://plnkr.co/edit/PLtTNqyZ9Kw4fjxspAnW?p=preview

dylanvdmerwe avatar Apr 19 '16 12:04 dylanvdmerwe

how come does this work? And what if I want the component on the left of the input? http://plnkr.co/edit/CDKeuGkZUIcXQQoLylD0?p=preview

jalef avatar Apr 19 '16 13:04 jalef

Hello all! This should be fixed in beta.6 as we now inject IONIC_DIRECTIVES by default. Thanks!

jgw96 avatar May 11 '16 15:05 jgw96

Hello I have upggrated to beta.6 but this still remains A component renders only if i put the attribute 'item-right'

Thanks

jalef avatar May 24 '16 11:05 jalef

@jalef I guess that this should be fixed in beta.8 with the addition of the item-content selector/attribute which allows rendering of custom components placed inside <ion-item>, see #6643 for more information.

iignatov avatar Jun 07 '16 17:06 iignatov