nativescript-slides icon indicating copy to clipboard operation
nativescript-slides copied to clipboard

Dynamic addition of custom components in the slider

Open ESISARPI24 opened this issue 7 years ago • 0 comments

Hi, I'm currently using NativeScript with Angular, and I'm trying to reach the result of this code:

<SlideContainer id="slides" row="0"  loop="true" (changed)="onChanged($event)" angular="true" #slides>
             <Slide>
                    <custom-component1></custom-component1>
            </Slide>

            <Slide>
                    <custom-component2></custom-component2>
            </Slide>

            <Slide>
                    <custom-component3></custom-component3>
            </Slide>

            <Slide>
                    <custom-componentN></custom-componentN>
            </Slide>
</SlideContainer> 

into the .ts, without knowing how many <Slide> element I will add. I've tried to use your dyanamic example https://github.com/TheOriginalJosh/nativescript-slides into the doc, where you use the .addChild() function, but for the moment I can only add dynamically elements specific to NativeScript like Label.

ESISARPI24 avatar Jun 07 '18 08:06 ESISARPI24