<commit_before>var app = angular.module('genome', [
  'datamaps',
  'genome.pool',
  'genome.self',
  'genome.relatives',
  'ngRoute',
  'ngCookies',
  'genome.d3Service',
  'genome.sideNav',
  'genome.auth',
  'genome.directive',
  'ngMaterial'
])

.config(function ($routeProvider) {
  $routeProvider
    .when('/', {
      redirectTo: '/pool'
    })
    .when('/signin', {
      templateUrl: '/',
      controller: 'AuthController'
    })
    .when('/signout', {
      templateUrl: '/templates/landing.html',
      authenticate: true
    })
    .when('/pool', {
      templateUrl: '/static/app/pool/pool.html',
      controller: 'PoolController',
      authenticate: true
    })
    .when('/self', {
      templateUrl: '/static/app/self/self.html',
      controller: 'SelfController',
      authenticate: true
    })
    .otherwise({
      redirectTo : '/signin'
    });
})
.run(function($rootScope, $location, $cookies){
  var isAuth = function () {
    return $cookies['user_profile_id'];
  };

  $rootScope.$on('$routeChangeStart', function(evt, next, current){
    if(next.$$route && next.$$route.authenticate && ! isAuth()){
      $location.path('/signin');
    }
  });
});
<commit_msg>Resolved login issue redirecting back to landing with angular components<commit_after>var app = angular.module('genome', [
  'datamaps',
  'genome.pool',
  'genome.self',
  'genome.relatives',
  'ngRoute',
  'ngCookies',
  'genome.d3Service',
  'genome.sideNav',
  'genome.auth',
  'genome.directive',
  'ngMaterial'
])

.config(function ($routeProvider) {
  $routeProvider
    .when('/', {
      templateUrl: '/static/app/pool/pool.html',
      controller: 'PoolController'
    })
    .when('/signin', {
      templateUrl: '/',
      controller: 'AuthController'
    })
    .when('/signout', {
      templateUrl: '/templates/landing.html',
      authenticate: true
    })
    .when('/pool', {
      templateUrl: '/static/app/pool/pool.html',
      controller: 'PoolController',
      authenticate: true
    })
    .when('/self', {
      templateUrl: '/static/app/self/self.html',
      controller: 'SelfController',
      authenticate: true
    })
    .otherwise({
      redirectTo : '/signin'
    });
})
.run(function($rootScope, $location, $cookies){
  var isAuth = function () {
    return $cookies['user_profile_id'];
  };

  $rootScope.$on('$routeChangeStart', function(evt, next, current){
    if(next.$$route && next.$$route.authenticate && ! isAuth()){
      $location.path('/signin');
    }
  });
});

{'fraction_non_alphanumeric': 0.18682634730538922, 'fraction_numerical': 0.0007984031936127744, 'mean_word_length': 2.9651898734177213, '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': '3171681', 'n_tokens_mistral': 850, 'n_tokens_neox': 817, 'n_words': 135}