summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-12-07 10:54:24 -0500
committerTucker Evans <tuckerevans24@gmail.com>2019-12-08 15:03:07 -0500
commit3b43f292a605717d08d3623e09bf35a4e0301414 (patch)
tree2123c3a30b80ad30cb3810f1c2c13ed41ece9e11
parent5fdef8455c33dcd192497c6fe0217ccb89e8bf66 (diff)
Fix set non-submit buttons type to "button"
This stops these buttons from triggering the submit action.
-rw-r--r--recipeBuddy/src/app/add-recipe/add-recipe.component.html5
-rw-r--r--recipeBuddy/src/app/add-recipe/add-recipe.component.ts1
2 files changed, 3 insertions, 3 deletions
diff --git a/recipeBuddy/src/app/add-recipe/add-recipe.component.html b/recipeBuddy/src/app/add-recipe/add-recipe.component.html
index 699f306..7e80e4e 100644
--- a/recipeBuddy/src/app/add-recipe/add-recipe.component.html
+++ b/recipeBuddy/src/app/add-recipe/add-recipe.component.html
@@ -24,7 +24,8 @@
<div formArrayName="ingredients">
<h3>Ingredients</h3>
- <button mat-mini-fab color="primary" (click)="addIngredient()">
+ <button mat-mini-fab color="primary" (click)="addIngredient()"
+ type="button">
<mat-icon>add</mat-icon>
</button>
<div *ngFor="let address of ingredients.controls; let i=index">
@@ -48,7 +49,7 @@
<div formArrayName="steps">
<h3>Steps</h3>
- <button mat-mini-fab color="primary" (click)="addStep()">
+ <button mat-mini-fab color="primary" (click)="addStep()" type="button">
<mat-icon>add</mat-icon>
</button>
<div *ngFor="let address of steps.controls; let i=index">
diff --git a/recipeBuddy/src/app/add-recipe/add-recipe.component.ts b/recipeBuddy/src/app/add-recipe/add-recipe.component.ts
index eaa45d2..469871b 100644
--- a/recipeBuddy/src/app/add-recipe/add-recipe.component.ts
+++ b/recipeBuddy/src/app/add-recipe/add-recipe.component.ts
@@ -75,7 +75,6 @@ export class AddRecipeComponent {
}
onSubmit() {
- console.log('In Submit')
var formData = this.recipeForm.value;
var ingredients = []