Skip to content

Dynamic addition of custom components in the slider #117

@ESISARPI24

Description

@ESISARPI24

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions