Looking for assistance with a text box
<input type="text" [ngStyle]="(show_div===true) ? {'border-color':'red','color':'red'} : {'border-color': 'green','color':'green'}" [(ngModel)]="values[i]"/>
When the show_div
variable is true, I want to style it with
{'border-color':'red','color':'red'}
, and if it is false, then with {'border-color': 'green','color':'green'}
. However, initially, I would like the textbox and text color to be black. Even though green and red are working correctly, the text is set to green initially which is not desired.
If anyone has a solution, I would greatly appreciate it. Thank you!