Is there a way to change the text color that is being retrieved from the endpoint? Currently, it only shows the value of the ternary operator on the UI ('backgroundColor:green'). I need assistance with this. Can anyone help?
mainTrack() {
this.axios
.get(
`${configObject.apiBaseUrl}/Maintenance/Company`,
configObject.authConfig()
)
.then((res) => {
this.maintainTrack= res.data;
this.maintainTrack.forEach(element => {
element.isResolve = element.isResolve== 'true' ? 'backgroundColor:green' :
'backgroundColor:red'
});
})
.catch((error) => {});
},