IonicLoading succes promise fired before load is shown

In a project I want to show the Load indicator before I navigate to the next view, to achieve this, I’m trying to use the following code:

$ionicLoading.show({
    hideOnStateChange: false,
    noBackdrop: true,
    templateUrl: 'components/capabilitymap/projectLoader.html'
}).then(function() {
    $state.go(stateName, params);
});

Sometimes the loader does show before the $state.go is fired, but sometimes it is not yet shown when this code is called. I’ve tried using the option delay 0, but this didn’t help.

How can I gaurantee that the Loading Indicator is shown before moving on the next page?

1 Like

Hi Martine, have you ever come to a solution? We are stucked on the same problem! Thank you!

Hi Rahms, I wasn’t able to find a solution which works with the success promise.
I currently don’t have access to the code in which I faced this issue. I think I used a different approach in which I didn’t need the loader. I’m sorry I can’t help you any further.

1 Like