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

Create dynamic Ion-Grid using ViewContainerRef.createComponent()

$
0
0

I want to create a dynamic grid using Ion-Grid inside a container I created in a template of my app.
I’m building a dynamic page structure using ViewContainerRef.createComponent(ComponentFactoryResolver.resolveComponentFactory(MyComponent)), and now I want to place my components inside the ionic grid system for responsibility. But especially ion-col needs to be directly inside of ion-row because of how flexboxes work, so I can’t place <ion-col><ng-template #mytemplate></ng-template></ion-col> inside a custom component, because Angular makes something like this out of my component: <my-component><ion-col><ng-template #mytemplate></ng-template></ion-col></my-component>.
I haven’t got to make it so I can create Ion-Cols and Ion-Rows with said createComponent() function.

Has anybody an idea how to do this?
Thanks in advance

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48979

Trending Articles



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