<commit_before>'use strict';

angular.module('GoalCreator', ['ngRoute'])

.controller('goalCtrl', function($scope, goalSubmissionService, goalTypeService){
  $scope.goal = {}; //Container for goal setup data
  $scope.goal.list = goalTypeService();
  $scope.goal.data = {}; //Container for goal json data
  $scope.goal.data = goalSubmissionService().get(); //Container for goal json data

  $scope.goal.review = goalSubmissionService().get(); //Container for review page

  $scope.goal.submitGoal = function(){
    console.log('submitting goal: ', $scope.goal.data);
  }

  $scope.updateDataFactory = function(stage){
    goalSubmissionService().set(stage, $scope.goal.data);
  }

})

.factory('goalTypeService', function(){ 

  var service = {
    get: function() {
      return this.data;
    },
    set: function(data){

    },
    data:[
    {
      type: 'Writing', //categorical type of goal
      validations: [ //list of preset validations
        {
          type: 'word count',
          startDate: null,
          endDate: null,
          count: null,
          validatorUrl: 'validators/word-count.html'<commit_msg>bug(goal): add correct path<commit_after>'use strict';

angular.module('GoalCreator', ['ngRoute'])

.controller('goalCtrl', function($scope, goalSubmissionService, goalTypeService){
  $scope.goal = {}; //Container for goal setup data
  $scope.goal.list = goalTypeService();
  $scope.goal.data = {}; //Container for goal json data
  $scope.goal.data = goalSubmissionService().get(); //Container for goal json data

  $scope.goal.review = goalSubmissionService().get(); //Container for review page

  $scope.goal.submitGoal = function(){
    console.log('submitting goal: ', $scope.goal.data);
  }

  $scope.updateDataFactory = function(stage){
    goalSubmissionService().set(stage, $scope.goal.data);
  }

})

.factory('goalTypeService', function(){ 

  var service = {
    get: function() {
      return this.data;
    },
    set: function(data){

    },
    data:[
    {
      type: 'Writing', //categorical type of goal
      validations: [ //list of preset validations
        {
          type: 'word count',
          startDate: null,
          endDate: null,
          count: null,
          validatorUrl: '/app/validators/word-count.html'
{'fraction_non_alphanumeric': 0.14927344782034346, 'fraction_numerical': 0.0, 'mean_word_length': 3.101083032490975, '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': '7410409', 'n_tokens_mistral': 708, 'n_tokens_neox': 668, 'n_words': 156}