title: CSS dynamic value in angular
body: <p>How can I get a CSS in a string to dynamically paint an <strong>HTML</strong> element?</p>
  
  <p>The HTML element must render a line of CSS code dynamically.
  the use of <code>[style.etc]</code>, <code>[ngStyle]</code>, <code>[style]</code>, <code>[ngStyle]</code>, <code>[ng-class]</code> does not work for me because I receive a string with CSS code from the backend, example:</p>
  
  <p>style: <code>"background: red; color: white;"</code></p>
  
  <p>I can not use the following solution:</p>
  
  <p><strong>style: "{{style}}"</strong> nor <strong>[style] = "style"</strong> because I get an alert in the console that says:</p>
  
  <p><strong>WARNING: sanitizing unsafe style value background: network; color: white;</strong></p>
  
  <pre><code>&lt;button type="button"
    *ngFor="let controlHTML of buttons"
    style="{{controlHTML.attributes.style}}"&gt; HelloWorld
  &lt;/button&gt;
  </code></pre>