Skip to content

Commit a259c20

Browse files
committed
ng class
1 parent 592b84b commit a259c20

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

presupuesto-app/src/app/formulario/formulario.component.html

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,35 @@
11
<form>
22
<div class="agregar">
33
<div class="agregar_contenedor">
4-
<select (change)="tipoOperacion($event)" class="agregar_tipo">
4+
<select
5+
(change)="tipoOperacion($event)"
6+
[ngClass]="{ redfocus: tipo === 'egr' }"
7+
class="agregar_tipo"
8+
>
59
<option value="ing" selected>+</option>
610
<option value="egr">-</option>
711
</select>
812
<input
13+
[ngClass]="{ redfocus: tipo === 'egr' }"
914
name="descripcionInput"
1015
type="text"
1116
class="agregar_descripcion"
1217
placeholder="Agregar Descripción"
1318
[(ngModel)]="descripcionInput"
1419
/>
1520
<input
21+
[ngClass]="{ redfocus: tipo === 'egr' }"
1622
name="valorInput"
1723
type="number"
1824
class="agregar_valor"
1925
placeholder="Valor"
2026
[(ngModel)]="valorInput"
2127
/>
2228
<button class="agregar_btn" (click)="agregarValor()">
23-
<i class="ion-ios-checkmark-outline"></i>
29+
<i
30+
[ngClass]="{ red: tipo === 'egr' }"
31+
class="ion-ios-checkmark-outline"
32+
></i>
2433
</button>
2534
</div>
2635
</div>

0 commit comments

Comments
 (0)