<commit_before>(function () {
  'use strict';

  angular
    .module('app')
    .controller('AppController', AppController);

  AppController.$inject = ['session', 'authService', '$state'];

  function AppController(session, authService, $state) {
    var vm = this;
    vm.session = session;

    vm.logout = function () {
      authService.logout(session.sessionId).then(function () {
        $state.go('login');
      });
    };
  }
})();<commit_msg>add pageLoading indication to logout request<commit_after>(function () {
  'use strict';

  angular
    .module('app')
    .controller('AppController', AppController);

  AppController.$inject = ['session', 'authService', '$rootScope', '$state'];

  function AppController(session, authService, $rootScope, $state) {
    var vm = this;
    vm.session = session;

    vm.logout = function () {
      $rootScope.pageLoading = true;
      authService.logout(session.sessionId).then(function () {
        $rootScope.pageLoading = false;
        $state.go('login');
      }, function () {
        $rootScope.pageLoading = false;
      });
    };
  }
})();
{'fraction_non_alphanumeric': 0.1659111514052584, 'fraction_numerical': 0.0, 'mean_word_length': 3.213740458015267, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6171392', 'n_tokens_mistral': 331, 'n_tokens_neox': 322, 'n_words': 62}