I have a page that changes it’s background colour based on dynamic data loaded via angular.
Becuase this data (the colour to change to) is not applied from the start of the view life cycle, the page flashes as it changes colour, during the view transition.
I am wondering if I can change the ordering of the page init cycle, so that the page is rendered before the animation starts?
This is in a tabbed navigation layout.
1 Like
EDIT - This now seems to not be needed with latest version of Ionic, and in fact was causing a bigger problem than it solved.
Thanks, seems like this page shows me the hack that I need.
To have a smooth display of my views, I'd like all my (static) images in the DOM to be fully loaded before the view is being displayed. If I listen to the $ionicView.beforeEnter event, I can get the list of images within the DOM, and wait for the...
Reading time: 1 mins 🕑
Likes: 5 ❤
I’m having the same issue now.
I’ve moved my data and style requests to a resolve on state but I seem to get a “blank glitch” when I navigate between tabs.
I have tab navigation and then a nested navigation. On the nested navigation the glitch doesn’t occur.
resolve: {
themeColor: ['$atAssets',function($atAssets) {
return $atAssets.getThemeColor;
}],
backgroundImage: ['$atAssets',function($atAssets) {
return $atAssets.getBackgroundImageUri;
}],
featureContent: ['atContent',function(atContent) {
return atContent.getFeatureJsonByName(featureName).then(function(featureJson){
return featureJson;
});
}]
}
All three return promises.
It worked fine without the glitch, when I was loading this from each controller but I want to have this the angular/ionic way (if possible).
I’m on the latest ionic release : 1.0.0-rc4