Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Brief black screen during navigation

$
0
0

A fresh install of the "sidemenu" starter app on Ionic 1.1 has this "brief black screen" issue on iOS devices. It doesn't occur when testing in Chrome or when testing in the iOS simulator, but it happens on the actual iOS device.

What happens:
1) Install Ionic "sidemenu" starter app
2) Build for iOS and run on an actual device
3) Click a few items in the Playlists list, going "Back" after viewing items
4) After a few clicks, you will see a black flash (looks like the background of the view being transitioned to) when moving from Playlists -> Single

The issue is much worse if you have complex content in your View. I only tested the stock starter app after trying to figure out which part of my own code was wrong. Turns out, it wasn't my code.

My solution: This is a hack I got from user "epuddu" above: I added a random state parameter value to every transition (I guess forcing Ionic to NOT use a cache). So, instead of:
href="#/app/playlists/1"
I use
ng-click="go(playlist.id)"
and then in PlaylistCtlr:
$scope.go = function(id) {
var d = new Date().getTime();
$state.go('app.single',{playlistId:id, rand:d});
}

That fixes the black flash for me.

So Ionic team: Something wrong with the view cache mechanism?


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>