title: Angular2 Styles in a Directive
body: <p>In the given examples of Attribute directives (i.e. a directive to add appearance/behaviour), we have a fairly simple setting of a style on the host element.. e.g.</p>
  
  <pre><code>import {Directive, ElementRef } from 'angular2/core';
  @Directive({
      selector: '[myHighlight]'
  })
  export class HighlightDirective {
      constructor(element) {
         element.nativeElement.style.backgroundColor = 'yellow';
      }
  
  static get parameters(){
      return [[ElementRef]];
  }
  </code></pre>
  
  <p>Rather than setting the style, can i use a styles instead? e.g.</p>
  
  <pre><code>@Directive({
      selector: '[myHighlight]',
      styles: [':host { background-color: yellow; }']
  })
  </code></pre>
  
  <p>This doesn't seem to work for me?</p>
  
  <p>I'm doing something slightly more complex which has led to a fair amount of monolothic code, setting lots of styles, using AnimationBuilder etc etc. feels to me like it would be much better to seperate this out into classes and animations in a CSS.</p>
  
  <p>ViewEncapsulation = emulated/default if that matters?</p>