<commit_before>// js/controllers/notes-index-controller

(function() {
  "use strict";

  angular.module("NoteWrangler")
    .controller("NotesIndexController", NotesIndexController);

  function NotesIndexController($http) {
    let vm = this;

    vm.getNotes = getNotes;

    getNotes();

    function getNotes() {
      $http({
        method: "GET",
        url: "/api/notes"
      }).success( (notesData) => {
        vm.notes = notesData;
      });<commit_msg>Refactoring. Using new Service<commit_after>// js/controllers/notes-index-controller

(function() {
  "use strict";

  angular.module("NoteWrangler")
    .controller("NotesIndexController", NotesIndexController);

  NotesIndexController.$inject = ["Note"];

  function NotesIndexController(Note) {
    let vm = this;

    vm.getAllNotes = getAllNotes;

    getAllNotes();

    function getAllNotes() {
      Note.getAllNotes()
      .success( (notesData) => {
        vm.notes = notesData;
      });
{'fraction_non_alphanumeric': 0.14182194616977226, 'fraction_numerical': 0.0, 'mean_word_length': 3.1148936170212767, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '529942', 'n_tokens_mistral': 307, 'n_tokens_neox': 284, 'n_words': 55}