<commit_before>'use strict';

/* Controllers */

var dirtyChoreControllers = angular.module('dirtyChoreControllers', []);

dirtyChoreControllers.controller('HomeCtrl', ['$scope', function($scope) {
    $scope.users = [{name:"Bob"}, {name:"Joe"}];
  }]);<commit_msg>Fixed controllers  Please enter the commit message for your changes. Lines starting<commit_after>'use strict';

/* Controllers */

var dirtyChoreControllers = angular.module('dirtyChoreControllers', []);

/* Home Page */
dirtyChoreControllers.controller('HomeCtrl', ['$rootScope', 'UserService', 
  function($rootScope, UserService) {
    $rootScope.showLeaderboardView = false;
    $rootScope.showProfileView = false;
    $rootScope.users = [{
      id: 0,
      name: "Jenny",
      score: 0,
      currentChore: [0, -1]
    },
    {
      id: 1,
      name: "Juliet",
      score: 0,
      currentChore: [1, -1]
    },
    {
      id: 2,
      name: "Jad",
      score: 0,
      currentChore: [2, -1]
    },
    {
      id: 3,
      name: "James",
      score: 0,
      currentChore: [3, -1]
    },
    {
      id: 4,
      name: "Jarrett",
      score: 0,
      currentChore: [4, -1]
    }];

    $rootScope.chores = [
    {
      name: "Garbage",
      description: "Take out trash and recycling when necessary."
    },
    {
      name: "Bathroom",
      description: "Clean toilet bowl and surfaces."
    },
    {
      name: "Floors",
      description: "Sweep and vacuum."
    },
    {
      name: "Countertops",
      description: "Wipe down with clean towel."
    },
    {
      name: "Dishes",
      description: "Wash thoroughly."
    }];

    // var promise = new Promise(function(resolve) {
    //   UserService.success(function(data) {
    //     console.log(data);
    //     resolve(data);
    //   });
    // });

    // promise.then(function(result){
    //   $rootScope.users = result;
    // });

    $rootScope.changeProfileView = function(userId){
      $rootScope.currentUserId = userId; // available to other controllers
      $rootScope.showProfileView = true;
    };
}]);

/* Profile Page */
dirtyChoreControllers.controller('ProfileCtrl', ['$rootScope', function($rootScope) {

  $rootScope.changeLeaderBdView = function(user){
     $rootScope.showLeaderboardView = true;
     $rootScope.showProfileView = false;
  };
}]);

/* Leaderboard Page */
dirtyChoreControllers.controller('LeaderboardCtrl', ['$rootScope', function($rootScope) {
  $rootScope.varb = '';
}]);
{'fraction_non_alphanumeric': 0.15941439609597396, 'fraction_numerical': 0.008133387555917039, 'mean_word_length': 2.6229749631811488, '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': '195823', 'n_tokens_mistral': 814, 'n_tokens_neox': 800, 'n_words': 161}