Below is the input I have:
The HTML code is shown below:
<input type="number" ng-class="{negative: amount < 0}" ng-model="amount"/>
This is the corresponding CSS code:
.negative {
color: red;
}
If the amount is positive, no specific style will be applied. However, if the amount is negative, it will use the ".negative" class to display the font in red color.
I would like the "positive" class to show up when the amount is a positive number as well.
Could someone please provide guidance on how to handle both positive and negative values?
Here is the CSS for the positive class:
.positive {
color: blue;
}