title: Angular 2 setting background image and color in [ngStyle]
body: <p>I am working on an Angular 2 project and trying to set both a background image and a opaque gradient using <code>[ngStyle]</code> These will eventually be variables pulled from JSON, or else I would just write them in my SCSS file. This is the code I am trying to use but it's not working.  I can set either a background color or image using <code>[ngStyle]</code>, but not both.</p>
  
  <pre><code>&lt;header [ngStyle]="{
      'background': 'linear-gradient(0deg, rgba(119, 233, 207, 0.5), 
       rgba(119, 233, 207, 0.5)), 
       url('example.com/image.png') center center / cover no-repeat'
  }"&gt;
  </code></pre>
  
  <p>This code in my SCSS file gives me exactly the result I want.</p>
  
  <pre><code>header {        
      background: linear-gradient(0deg, rgba(119, 233, 207, 0.5), 
      rgba(119, 233, 207, 0.5)), 
      url('example.com/img.png');
  }
  </code></pre>
  
  <p>Does anyone know if it is possible to specify both a background image and a opaque gradient using <code>[ngStyle]</code>?  Thanks!</p>