title: NG Style not changing background color
body: <p>I have an <code>ngStyle</code> directive that I am trying to use however it is not changing the <code>background-color</code> of the toggle checkbox I have. When the toggle is false I want to have a grey background and when it is true I want to have an orange background.</p>
  <pre><code>&lt;div class=&quot;relative&quot;&gt;
   &lt;input id=&quot;toggleBroker&quot; type=&quot;checkbox&quot; class=&quot;hidden&quot; formControlName='sendToBroker' name=&quot;sendToBroker&quot; [(ngModel)]=&quot;brokerDetails.sendtoBroker&quot; (onChange)=&quot;!sendToBroker = sendToBroker&quot;/&gt;
   &lt;div id=&quot;toggleBrokerBG&quot; class=&quot;toggle__line w-10 h-4 rounded-full shadow-inner&quot; [ngStyle]=&quot;'!sendToBroker' ? {'background-color': 'grey'} : {'background-color': 'orange'}&quot; &gt;&lt;/div&gt;
   &lt;div class=&quot;toggle__dot absolute w-6 h-6 bg-white rounded-full shadow inset-y-0 left-0&quot;&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/G4Cky.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/G4Cky.png" alt="Image of toggle checkbox" /></a></p>
  <p>Any idea what is wrong?</p>