Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49083

How to do nested components in Ionic Angular?

$
0
0

Hey guys, I’m primarily a Vue developer and recently had to work with the ionic angular code base and I have been having trouble with using component inside another component.

Here’s what I want to do:

Page has a parentComponent --> parentComponent has a childComponent

Here’s what I’ve done:

Created one Page and two components (parentComponent, childComponent), now I can import and use parentComponent inside Page or childComponent inside Page, How do I import and use childComponent inside parentComponent.

When I googled a lot, the only way I could get it to work is importing both (parentComponent, childComponent) into Page and using childComponent inside parentComponent somehow seems to automatically work, Is this the correct approach?

Thanks

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 49083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>