add submit button with mat angular
This commit is contained in:
@@ -82,12 +82,8 @@ export class RecipeAddComponent {
|
|||||||
}
|
}
|
||||||
const id = parseInt(value.selectedIngredient!);
|
const id = parseInt(value.selectedIngredient!);
|
||||||
if (this.ingredientEntries.find((ingredient) => ingredient.idIngredient === id)) {
|
if (this.ingredientEntries.find((ingredient) => ingredient.idIngredient === id)) {
|
||||||
console.log("oh");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log("ah");
|
|
||||||
console.log(this.ingredients.find(v => v.id === id)?.name)
|
|
||||||
console.log(this.ingredients);
|
|
||||||
this.ingredientEntries.push({
|
this.ingredientEntries.push({
|
||||||
idIngredient: id,
|
idIngredient: id,
|
||||||
idRecipe: -1,
|
idRecipe: -1,
|
||||||
|
Reference in New Issue
Block a user