<commit_before>'use strict';

angular
  .module('weather', ['ngRoute'])
  .config(($routeProvider) => {

    // Object to pass to $routeProvider for resolve arg
    const checkForAuth = {
      checkForAuth: (AuthFactory) => AuthFactory.onAuth()
    };

    $routeProvider
      .when('/', {
        controller: 'RootCtrl',
        templateUrl: 'partials/root.html'
      })
      .when('/weather/:zipcode', {
        controller: 'WeatherCtrl',
        templateUrl: 'partials/weather.html',
        // Will run first, on bind
        resolve: checkForAuth
      })
      .otherwise('/');

  })
  .controller('RootCtrl', function($scope) {

    $scope.searchForecast = (search) => {
      if (search.length > 5 || search.length < 5) {
        $scope.searchInput = "";
        alert('Zipcode must be 5 digits long.');
        return;
      }
<commit_msg>Now passing the resolve an object directly<commit_after>'use strict';

angular
  .module('weather', ['ngRoute'])
  .config(($routeProvider) => {

    $routeProvider
      .when('/', {
        controller: 'RootCtrl',
        templateUrl: 'partials/root.html'
      })
      .when('/weather/:zipcode', {
        controller: 'WeatherCtrl',
        templateUrl: 'partials/weather.html',
        // Resolve will run first, on bind
        // Object to pass to $routeProvider for resolve arg
        resolve: { checkForAuth: (AuthFactory) => AuthFactory.onAuth() }
      })
      .otherwise('/');

  })
  .controller('RootCtrl', function($scope) {

    $scope.searchForecast = (search) => {
      if (search.length > 5 || search.length < 5) {
        $scope.searchInput = "";
        alert('Zipcode must be 5 digits long.');
        return;
      }

{'fraction_non_alphanumeric': 0.15457227138643068, 'fraction_numerical': 0.0035398230088495575, 'mean_word_length': 2.3584158415841583, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '2628639', 'n_tokens_mistral': 514, 'n_tokens_neox': 492, 'n_words': 114}