JoshDSommer / nativescript-slides

A NativeScript plugin that is for Intro Tutorials, Image Carousels or any other slide functionality
Other
70 stars 32 forks source link

Dynamic addition of custom components in the slider #117

Open ESISARPI24 opened 6 years ago

ESISARPI24 commented 6 years ago

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 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.