JoshDSommer / nativescript-ngx-slides

A NativeScript + Angular module for to add a slides component to your mobile app
Other
45 stars 34 forks source link

Can't get this to work on either iOS or Android #47

Closed FranciZ closed 6 years ago

FranciZ commented 6 years ago

I get the same result on both platforms. Overlapping slides that don't respond to sliding. See attached screenshot which is from the demo in /slides.

I'm guessing one of the core dependencies is an issue I just can't narrow it down. Tried all sorts of different tns-android versions, Angular versions, nativescript-angular versions etc. with no results. Using the setup in /slides doesn't work either. iOS or Android, both produce the overlapping slides.

screenshot_20171227-105856

FranciZ commented 6 years ago

I reverted to a previous commit 89553f616c031428e10ac402650060513a0fe776 and that seems to work... You might want to look into this.

JoshDSommer commented 6 years ago

@FranciZ thank you for the heads up. I think i'm going to revert that commit, adding pinch to zoom doesn't really feel like something that should be in the scope of this project.

FranciZ commented 6 years ago

@TheOriginalJosh sure, no problem. One other thing. On iOS I see this error if I don't have the data ready at compile time and load it asynchronously. It still renders the slides but they are all overlapping and don't work.

ERROR [native code]: ERROR TypeError: undefined is not an object (evaluating '_co.listing.labels')

It works on Android but it fails on iOS. Does this library allow for a dynamic data model/array? If I want to rerender the component after adding or removing slides should that work out of the box? How should I go about achieving this?

FranciZ commented 6 years ago

I managed to work around this by using *ngIf on <slides> and removing the component while updating the array and radding it later. Can use a simple setTimeout with 0 just to let it remove and add after. It's hacky I guess but it works on both Android and iOS. Is there a better (correct) way of doing this?

JoshDSommer commented 6 years ago

This should be working again with the latest release, I'm sorry for the long delay.