We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a259c20 commit 8322ee6Copy full SHA for 8322ee6
presupuesto-app/src/app/formulario/formulario.component.html
@@ -1,4 +1,4 @@
1
-<form>
+<form (ngSubmit)="f.form.valid && agregarValor()" #f="ngForm">
2
<div class="agregar">
3
<div class="agregar_contenedor">
4
<select
@@ -16,6 +16,7 @@
16
class="agregar_descripcion"
17
placeholder="Agregar Descripción"
18
[(ngModel)]="descripcionInput"
19
+ required
20
/>
21
<input
22
[ngClass]="{ redfocus: tipo === 'egr' }"
@@ -24,11 +25,13 @@
24
25
class="agregar_valor"
26
placeholder="Valor"
27
[(ngModel)]="valorInput"
28
29
- <button class="agregar_btn" (click)="agregarValor()">
30
+ <button type="submit" class="agregar_btn">
31
<i
32
[ngClass]="{ red: tipo === 'egr' }"
33
class="ion-ios-checkmark-outline"
34
+ (click)="agregarValor()"
35
></i>
36
</button>
37
</div>
0 commit comments