<commit_before>Mealpler.controller('AddMealModalCtrl', AddMealModalController);

function AddMealModalController (MealModel, StorageModel) {
    this.addProduct = true;

    this.newProducts = {};
    this.newProducts.list = [];
    this.newProducts.list.push(angular.copy(MealModel.createDefaultProduct()));
    this.newRecipe = angular.copy(MealModel.createDefaultRecipe());
    this.newRecipe.list.push(angular.copy(MealModel.createDefaultProduct()));

    this.createNewProduct = (forMeal) => {
        forMeal.list.push(angular.copy(MealModel.createDefaultProduct()));
    };

    this.toggleMealModal = () => {
        this.addProduct = !this.addProduct;
    };
}<commit_msg>MP-29: edits for AddMealModalCtrl<commit_after>Mealpler.controller('AddMealModalCtrl', AddMealModalController);

function AddMealModalController ($scope, $uibModalInstance, MealModel) {
    this.addProduct = true;
    this.newProducts = {};
    this.newProducts.list = [];
    this.newRecipe = angular.copy(MealModel.createDefaultRecipe());

    this.toggleMealModal = () => {
        this.addProduct = !this.addProduct;
    };

    this.createNewProduct = (forMeal) => {
        forMeal.list.push(angular.copy(MealModel.createDefaultProduct()));
    };

    this.createNewProduct(this.newProducts);
    this.createNewProduct(this.newRecipe);
}
{'fraction_non_alphanumeric': 0.13811320754716983, 'fraction_numerical': 0.0015094339622641509, 'mean_word_length': 4.390243902439025, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4932188', 'n_tokens_mistral': 426, 'n_tokens_neox': 411, 'n_words': 44}