<commit_before>var app = angular.module('KidcareApp', ['ngResource']);

app.factory('StoryAttachment', ['$resource', function($resource) {
  $resource("/story_attachments/:id");
}]);

app.factory('_', ['_', function($window) {
  'use strict';
  return $window._;
}]);

app.controller('StoryAttachmentController', ['StoryAttachment', '$scope', '_', function(StoryAttachment, $scope, _) {

  $scope.createAttachments = function(_attachments) {
    $scope.attachments = JSON.parse(_attachments);
  };

  $scope.removeAttachment = function(attachment) {
    StoryAttachment.remove({id: attachment.id});
    $scope.attachments = _.without($scope.attachments, attachment);
  };
}]);<commit_msg>fix issue that _ not declair correctly.<commit_after>var app = angular.module('KidcareApp', ['ngResource']);

app.factory('StoryAttachment', ['$resource', function($resource) {
  $resource("/story_attachments/:id");
}]);

app.factory('_', ['$window', function($window) {
  'use strict';
  return $window._;
}]);

app.controller('StoryAttachmentController', ['StoryAttachment', '$scope', '_', function(StoryAttachment, $scope, _) {

  $scope.createAttachments = function(_attachments) {
    $scope.attachments = JSON.parse(_attachments);
  };

  $scope.removeAttachment = function(attachment) {
    StoryAttachment.remove({id: attachment.id});
    $scope.attachments = _.without($scope.attachments, attachment);
  };
}]);
{'fraction_non_alphanumeric': 0.18892045454545456, 'fraction_numerical': 0.0, 'mean_word_length': 6.188775510204081, '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': '3012157', 'n_tokens_mistral': 427, 'n_tokens_neox': 428, 'n_words': 66}