- Notifications
You must be signed in to change notification settings - Fork 13.4k
Description
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