title: How do I change the color of a text in vue using ternary Operator?
body: <p>I want to change the text color coming from the endpoint. It only display the value of the ternary operator on the UI ('backgroundColor:green). Can someone help me ?</p>
  <pre><code>mainTrack() {
   this.axios
      .get(
        `${configObject.apiBaseUrl}/Maintenance/Company`,
        configObject.authConfig()
      )
      .then((res) =&gt; {
       this.maintainTrack= res.data;
  
       this.maintainTrack.forEach(element =&gt; {
         element.isResolve = element.isResolve== 'true' ?  'backgroundColor:green' :  
          'backgroundColor:red'
              });
      })
      .catch((error) =&gt; {});
  },
  </code></pre>