<commit_before>'use strict';

app.controller('AddWordPageCtrl', function (API, $scope, $window) {

    $scope.newWord = {
        word : undefined,
        definition : undefined,
    };

    $scope.addWord = function() {
        $scope.newWord.word = $scope.newWord.word.toString().toLowerCase();
        var newWordJSON = JSON.stringify($scope.newWord);
        API.addWord(newWordJSON).success(function(data){
            $window.location.href = '/#/menu/word_list';
        });
    };

});
<commit_msg>Reloading word list page after adding a word<commit_after>'use strict';

app.controller('AddWordPageCtrl', function (API, $scope, $window) {

    $scope.newWord = {
        word : undefined,
        definition : undefined,
    };

    $scope.addWord = function() {
        $scope.newWord.word = $scope.newWord.word.toString().toLowerCase();
        var newWordJSON = JSON.stringify($scope.newWord);
        API.addWord(newWordJSON).success(function(data){
            $window.location.href = '/#/menu/word_list';
            $window.location.reload();
        });
    };

});

{'fraction_non_alphanumeric': 0.15711645101663585, 'fraction_numerical': 0.0, 'mean_word_length': 2.7216494845360826, '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': '3910671', 'n_tokens_mistral': 325, 'n_tokens_neox': 324, 'n_words': 52}