Ionic View Not Refreshing Android

Here’s an interesting issue this morning. I’m setting up a new dev machine, so figured I’d take this chance to upgrade. I’m now with Cordova 5.0.0, so I think this might have something to do with the following…

I have an app that displays a list. The user can tap search, bring up a modal and search the results (another REST call).

I throw up a loading screen until we’re done with the search. Then re-render the list. Pretty basic.

This has been working fine, works perfect in Ionic Serve and iOS.

In Android, I end up with a blank screen after load. I’m using a side menu. If I drag the side menu out a bit and let it head back to the side, then the list renders properly.

Its almost as if the $digest isn’t firing properly, but it seems to be working fine in iOS and on the web… any thoughts?

Looking into this a little more I can confirm the elements exist in the DOM, they’re just not displayed properly. I can programatically trigger the menu to make them appear.

So this sounds like a case of needing the cordvoa whitelist plugin

http://cordova.apache.org/announcements/2015/04/15/cordova-android-4.0.0.html

Thanks, but nope.

I have that installed for AJAX calls. If it wasn’t on the whitelist I wouldn’t be getting any response. I’m actually getting the expected result from the first time I load the controller, just not the second time.

The data also appears if I move the sidebar out a bit and allow it to return. Its something to do with rendering.

Hmm, you could try calling $ionicScrollDelegate.resize() after loading the data?

You think like me!

I tried that, but no dice. The following causes the the view to update if I put it into the callback of the REST call, but it is obviously not an acceptable solution.

$ionicSideMenuDelegate.toggleLeft(true);
$timeout(function () {
    $ionicSideMenuDelegate.toggleLeft(false);
}, 10);

The other bit of oddness about this is its only Android. Why is this happening in the Android mechanism, but not iOS?