Hi. I’d like to ask how would I be able to show a loading indicator ($ionicLoading) everytime I change state during transition from one tab view to another?

For example I have this code:

scope.selectFriendsTab = function() {

.service('loadingIndicator', [
    function($ionicLoading) {
      this.show = function() {
          templateUrl: 'templates/loading.html'
      this.hide = function() {

where loading.html contains the ionic icon for loading

but the loading indicator does not show. Am I missing something here?


How do this work for you?