Closed dylanvdmerwe closed 8 years ago
Thanks for opening an issue with us! I appreciate the detail! Would you mind making a codepen or a repo that we can use to repro this issue please?
Navigation: Page 1 (has slider) -> Page 4 (has slider) -> Page 2 (blank) Then go back to Page 1 and the slider's pager gets stuck.
Page 1 HTML
<ion-navbar *navbar>
<ion-title>Tab 1</ion-title>
</ion-navbar>
<ion-content>
<ion-slides pager loop="true" autoplay="true">
<ion-slide style="background-color: green">
<h2>Slide 1</h2>
</ion-slide>
<ion-slide style="background-color: blue">
<h2>Slide 2</h2>
</ion-slide>
<ion-slide style="background-color: red">
<h2>Slide 3</h2>
<button (click)="push()">Push</button>
</ion-slide>
</ion-slides>
</ion-content>
Page 1 TS
import {Page4} from '../page4/page4';
@Page({
templateUrl: 'build/pages/page1/page1.html',
})
export class Page1 {
constructor(private nav:NavController){
}
push() {
this.nav.push(Page4);
}
}
Page 4 HTML is identical to Page 1 above Page 4 TS is the same as above except it pushes Page2 onto NavController.
Page 2 TS
<ion-navbar *navbar>
<ion-title>
Tab 2
</ion-title>
</ion-navbar>
<ion-content class="page2">
</ion-content>
Result when navigating back to Page 1:
Was able to confirm this, here is a repo you can pull and use to repro it: https://github.com/jgw96/Ionic2-Slides-Test
Thanks for the issue! Should be fixed in the beta.5 release. :smile:
Short description of the problem:
After a new page has been pushed onto the navController, when navigating back to the ion-slides page, the pager is stuck on page 1.
What behavior are you expecting?
The pager gets stuck on index 1 and does not change when moving through the ion-slide views.
Steps to reproduce:
Ionic Version: 2.x
Browser & Operating System: iOS / Android / Chrome
Run
ionic info
from terminal/cmd prompt: