Ionic 2 nav Back not working properly
I dont Know why sometimes its works and sometimes its not working..
My Code:
<ion-navbar *navbar primary> <ion-title>Event's Details</ion-title> </ion-navbar>
My System INFO:
Your system information:
Cordova CLI: 6.2.0 Ionic Framework Version: 2.0.0-beta.8 Ionic CLI Version: 2.0.0-beta.31 Ionic App Lib Version: 2.0.0-beta.17 ios-deploy version: Not installed ios-sim version: 5.0.8 OS: Mac OS X El Capitan Node Version: v4.4.5 Xcode version: Xcode 7.3 Build version 7D175
Hello, thanks for opening an issue with us! Would you be able to provide a plunker that demonstrates this issue? Thanks for using Ionic!
Actually It Happens. Sometimes it works and sometime it not..
I have really big app which Im working on it.
On particular page. Data is fetching from server and Nav bar sometime works and some times not.. And it only happens on that page not others
Hello @Ghayyas. Unfortunately without a minimal reproducible example I cannot do too much to debug the issue. If you could provide a repo that would work too. Thanks!
@jgw96 Thanks for your Reply. Here is my File link
https://github.com/Ghayyas/Ionic2app/blob/development/app/pages/event-details/event-details.html
Hello! Thanks for the link! Is there a reason your using a style tag in your template? All styling should be done in the sass file of each component. Would you mind removing the style tag, moving all styling to sass and then testing again? Thanks for using Ionic!
Hello @jgw96 ! Thanks for your reply. There is some problem with saas file. If I write Some class that is only available for this page. But that class also available on others page. Like ion-scroll{ overflow-x: hidden; overflow-y: scroll; }
So that is why I put Style tag on it..
I removed The Style Tag.. But the Problem is same :(
@Ghayyas Ahh ok. You can take a look at our ionic-conference-app for the proper way to scope your sass styles. Unfortunately, that is the only thing that i spotted wrong with your template. If their is any way that you can provide a plunker or git repo that reproduces this issue that would be great, as I cannot reproduce this issue. I would recommend using Chrome dev tools to check for errors. Thanks for using Ionic!
@jgw96 Recently I just Upgrade my Ionic project from ionic beta 8 to beta 10 but Problem is still same.. I removed script tag and all there attributes and values but Still facing same problem. I dont think its because sass.. Expect this page.. Ionic nav button works perfectly.. but only on this is page its having problem dont know why.. :(
@Ghayyas Sorry, but because i cannot seem to reproduce this issue and it looks like this is a support issue and not an actual issue with the framework I will be closing this for now and recommending that you ask around our forum for further help. Thanks for using Ionic!
So How this issue can be fixed??
Hi I had the same issue. One page fetched some info from the server then opened a new page and sometimes the back button doesn't work.
I discovered that this was because the page was opened before the loading were dismissed.
My code where like this:
this.loading.dismiss(); this.nav.push(MyBuysPage,{"buyList":buyList});
So I changed to this and fixed the issue:
this.loading.dismiss().then(()=>{ this.nav.push(MyBuysPage,{"buyList":buyList}); });