I have a challenge in binding the input value (within a foreach loop) in the HTML section of my component to a function:
<input [ngModel]="getStepParameterValue(parameter, testCaseStep)" required />
...
// Retrieving the previously saved value for this parameter
getStepParameterValue(parameter: UIParameter, testCaseStep:TestCaseStep) {
testCaseStep.Parameters.forEach((stepParameter: Parameter) => {
if (stepParameter.UIOperationParameterName === parameter.UIOperationParameterName)
{
if (stepParameter.ParameterValue == null)
{
return null;
}
console.log("Found value");
return "Found a Value";
}
});
// No value was found for this parameter
return null;
}
Upon viewing the page in a browser, I noticed the following:
https://i.sstatic.net/t9ePN.png
However, none of my inputs display "Found a Value":