title: Dynamically setting the a css property of a child in Angular 2
body: <p>I'm struggling to set a css property of a child tag in angular 2 using the <code>ngStyle</code> directive.</p>
  <p>I'm not sure if it complicates it that I'm trying to apply it to an SVG.</p>
  <h1>Current Situation</h1>
  <p>I have a spinner, implemented as such:</p>
  <p><code>&lt;ion-spinner name=&quot;bubbles&quot;&gt;&lt;/ion-spinner&gt;</code></p>
  <p>The selector comes from the <a href="http://ionicframework.com/docs/api/directive/ionSpinner/" rel="nofollow noreferrer">ionic framework</a>.</p>
  <p>The current code I have is:</p>
  <pre><code>@Component({
     selector: 'some-selector',
     template: `
          &lt;ion-spinner name=&quot;bubbles&quot;&gt;&lt;/ion-spinner&gt;
     `
  })
  export class SomeComponent {
     private someColour: string = &quot;red&quot;
  }
  </code></pre>
  <p>I know that I can use the styles array in the component director to affect the css styling (although due to encapsulation (I think) it has to go in to its own css style sheet, rather than the component's styles other wise it only affects some properties), and I can also use the ngStyle property to have dynamic css styling. However, the element comes out like this in the html:</p>
  <pre><code>&lt;ion-spinner name=&quot;bubbles&quot; class=&quot;spinner-bubbles&quot;&gt;
     &lt;!--template bindings={}--&gt;
     &lt;svg viewBox=&quot;0 0 64 64&quot; style=&quot;top: 0px; left: 9px; animation-delay: -1000ms; animation-duration: 1000ms;&quot;&gt;
        &lt;circle transform=&quot;translate(32,32)&quot; r=&quot;5&quot;&gt;&lt;/circle&gt;
     &lt;/svg&gt;...
  &lt;/ion-spinner&gt;
  </code></pre>
  <p>and the css needs to affect the 'circle' tag. I know the css I can use is:</p>
  <pre><code>ion-spinner  {
      * {
          fill: blue;
      }
  
      &amp;.spinner-circles circle,
      &amp;.spinner-bubbles circle,
      &amp;.spinner-dots circle {
          fill: blue;
      }
  }
  </code></pre>
  <p>As the spinner has bubbles, but:</p>
  <h3>how can i make the colour change dynamic from inside the selector?</h3>
  <p>I'm using angular &quot;2.0.0-rc.1&quot;</p>