You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior:
slidesDidLoad does not called after first time load. it opens fine first time and autoplays but after its cached its not called at all. see below attached code home.page.html and home.page.ts, what happens here is first time it works fine but as soon as i click any of the links and get back to this page from main page slidesDidLoad never fires.
Expected behavior:
slidesDidLoad does get called after first time load. it opens fine first time and autoplays and even if page is cached it should be called
Steps to reproduce:
1)
Related code:
home.page.html
<ion-content>
<ion-slides #mySlider (ionSlidesDidLoad)="slidesDidLoad(mySlider)" pager>
<ion-slide id="myElement1">
<a routerLink="/mainpage">
<img src="assets/home-slider/slider-one.jpg">
</a>
<div class="logo">
<img src="assets/home-slider/app-new.png">
</div>
</ion-slide>
<ion-slide id="myElement1">
<a routerLink="/mainpage">
<img src="assets/home-slider/slider-two.jpg">
</a>
<div class="logo">
<h5>Touch For More Designs</h5>
<img src="assets/home-slider/app-new.png">
</div>
</ion-slide>
<ion-slide id="myElement1">
<a routerLink="/mainpage">
<img src="assets/home-slider/slider-three.jpg">
</a>
<div class="logo">
<h5>Touch For More Designs</h5>
<img src="assets/home-slider/app-new.png">
</div>
</ion-slide>
<ion-slide id="myElement1">
<a routerLink="/mainpage">
<img src="assets/home-slider/slider-for.jpg">
</a>
<div class="logo">
<h5>Touch For More Designs</h5>
<img src="assets/home-slider/app-new.png">
</div>
</ion-slide>
<ion-slide id="myElement1">
<a routerLink="/mainpage">
<img src="assets/home-slider/slider-five.jpg">
</a>
<div class="logo">
<h5>Touch For More Designs</h5>
<img src="assets/home-slider/app-new.png">
</div>
</ion-slide>
<ion-slide id="myElement1">
<a routerLink="/mainpage">
<img src="assets/home-slider/slider-six.jpg">
</a>
<div class="logo">
<h5>Touch For More Designs</h5>
<img src="assets/home-slider/app-new.png">
</div>
</ion-slide>
<ion-slide id="myElement1">
<a routerLink="/mainpage">
<img src="assets/home-slider/slider-seven.jpg">
</a>
<div class="logo">
<h5>Touch For More Designs</h5>
<img src="assets/home-slider/app-new.png">
</div>
</ion-slide>
<ion-slide id="myElement1">
<a routerLink="/mainpage">
<img src="assets/home-slider/slider-eight.jpg">
</a>
<div class="logo">
<h5>Touch For More Designs</h5>
<img src="assets/home-slider/app-new.png">
</div>
</ion-slide>
<ion-slide id="myElement1">
<a routerLink="/mainpage">
<img src="assets/home-slider/slider-nine.jpg">
</a>
<div class="logo">
<h5>Touch For More Designs</h5>
<img src="assets/home-slider/app-new.png">
</div>
</ion-slide>
<ion-slide id="myElement1">
<a routerLink="/mainpage">
<img src="assets/home-slider/slider-ten.jpg">
</a>
<div class="logo">
<h5>Touch For More Designs</h5>
<img src="assets/home-slider/app-new.png">
</div>
</ion-slide>
</ion-slides>
</ion-content>
There are several options:
Option 1) Use routerDirection="root". So the component will be destroyed from the dom on navigating
Option 2) Use the ionViewWillEnter or ionViewDidEnter lifecycle hook which is also triggering when moving back to the page
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Bug Report
Ionic version:
[x] 4.0.0-beta.17
Current behavior:
slidesDidLoad does not called after first time load. it opens fine first time and autoplays but after its cached its not called at all. see below attached code home.page.html and home.page.ts, what happens here is first time it works fine but as soon as i click any of the links and get back to this page from main page slidesDidLoad never fires.
Expected behavior:
slidesDidLoad does get called after first time load. it opens fine first time and autoplays and even if page is cached it should be called
Steps to reproduce:
1)
Related code:
home.page.html
home.page.ts
Ionic info:
The text was updated successfully, but these errors were encountered: