I am working with an input field that has the variable name sipmaximum
. This variable is expected to contain a numeric value.
Here's an example:
9999
Here is the template:
<tr>
<th>SIP maximum </th>
<td>
<input id="sipmaximum" name="sipmaximum" type="text" class="form-control" [(ngModel)]="sipmaximum" style="width: 70%" required greaterThanZero />
</td>
</tr>
https://i.sstatic.net/cwm64rpg.png
In normal scenarios, the variable sipmaximum
should display as follows:
9999.00
Below is the JSON data:
{
"AANBOD": {
"ISINAANBOD": "Y",
"RISK": "3",
// other key-value pairs
"SIPMINIMUM": 50,
"SIPMAXIMUM": 9999
}
}
How can I ensure that the .00
is always added to the displayed value of the sipmaximum
variable?
Interface section...
export interface PurchasableSecuritieResponse extends ApiResponse {
TIT: Tit[];
}
export interface Tit {
ADVTITRE: {
BASIQUETITRE: {
// nested object structure
};
EXIST: number;
SECE: number;
// more fields...
};
TITARG: {
COMPLEXITY: string;
CREATTIME: string;
// additional properties...
};
AANBOD: {
ISINAANBOD: string;
RISK: string;
// relevant fields including SIPMINIMUM and SIPMAXIMUM
};
...