Skip to content

Delay in showing initialSlide inside modal #9819

@amuramoto

Description

@amuramoto

Ionic version: (check one with "x")
[ ] 1.x
[X ] 2.0-RC4

I'm submitting a ... (check one with "x")
[ X] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:

When using the Slides component with the initialSlide option set inside a Modal component, the first slide appears briefly before switching to the initialSlide.

Expected behavior:
Slide specified by initialSlide should appear when the modal is opened

Steps to reproduce:

Related code:
image-modal.ts

export class ImageModal { photos: Array<any>; name: string; slideOptions: any; constructor(params: NavParams) { this.photos = params.data.photos; this.name = params.data.name; this.slideOptions = { initialSlide: params.data.startIndex, loop: true, pager: true } } } 

template.html

<ion-content padding> <ion-slides [options]="slideOptions"> <ion-slide *ngFor="let photo of photos"> <img class="image" [src]="photo.original"> <ion-item no-padding no-lines> <ion-avatar item-left> <img [src]="photo.userPhoto"> </ion-avatar> {{photo.user}} </ion-item> </ion-slide> </ion-slides> </ion-content> 

Other information:
Video: https://dl.dropboxusercontent.com/u/96909560/slides.mov

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Cordova CLI: 6.4.0 Ionic Framework Version: 2.0.0-rc.4 Ionic CLI Version: 2.1.18 Ionic App Lib Version: 2.1.9 Ionic App Scripts Version: 0.0.47 ios-deploy version: 1.9.0 ios-sim version: Not installed OS: OS X El Capitan Node Version: v6.9.1 Xcode version: Xcode 8.1 Build version 8B62 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions