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

breaks with angular2 *ngFor #90

Closed developper89 closed 7 years ago

developper89 commented 7 years ago

Hello, the plugin breaks with angular 2 *ngFor on the Slides

<SlideContainer #slider [angular]="true" [disablePan]="false" #slides [pageIndicators]="false" [loop]="false">
<Slide *ngFor="let item of items; let i= index" width="100%" backgroundColor="white">
<Label [text]="''Panel '+i '" color="black" textWrap="true" verticalAlignment="center" horizontalAlignment="center"></Label>
            </Slide>
</SlideContainer>

After executing this.slides.nativeElement.constructView() the slider is not rendered properly. But if i remove the *ngFor and add some slides manually it works. This it is definitely not what i want.

<Slide width="100%" backgroundColor="black">
                <Label [text]="'Panel '" color="white" textWrap="true" verticalAlignment="center" horizontalAlignment="center"></Label>
            </Slide>
            <Slide width="100%" backgroundColor="white">

                <Label [text]="'Panel '" color="black" textWrap="true" verticalAlignment="center" horizontalAlignment="center"></Label>

            </Slide>
            <Slide width="100%" backgroundColor="yellow">

                <Label [text]="'Panel '" color="black" textWrap="true" verticalAlignment="center" horizontalAlignment="center"></Label>

            </Slide>
MetaiR commented 5 years ago

@developper89 what did u do after facing this problem? I have the same issue and looking for some answer (even use another plugin) for days