I’d like to modify the
$ionicLoader service slightly so that each time it’s
show method is called it will increment a counter. This same counter would then also be decreased when the
hide method is called, and only actually hide the loading indicator once the counter reaches zero.
All of this can be made to be optional, and the
hide method can also provide and option for forcing the hide action despite the counters value.
I find that I require this behaviour quite often as I usually have more than one background process that I’d like to complete before allowing the user to continue.
I’m currently using a little hack-around to provider this functionality, but I’d be more that willing to implement it and contribute on the
$ionicLoading service if others would also find it useful.