title: Angular 2 - How to set animations on a Directive?
body: <p>I have a <code>Directive</code> I can put on elements that checks the current scroll position of the element in question.</p>
  
  <p>Looks like this:</p>
  
  <pre><code>@Directive({
      selector: '[my-scroll-animation]'
  })
  </code></pre>
  
  <p>Whenever the position satifies a certain treshold, I want the element to appear on screen using an animation. I know that for a <code>Component</code> I can attach an <code>animations</code> property along with some settings in the <code>host</code> property to activate the animation.</p>
  
  <p>I would like something like this:</p>
  
  <pre><code>import { myScrollAnimation } from './animations';
  
  @Directive({
      selector: '[my-scroll-animation]'
      animations: [myScrollAnimation] // &lt;- not possible?
  })
  </code></pre>
  
  <p>How can I achieve this in a Directive?</p>
  
  <p>Using: Angular <code>4.0.0-rc.4</code></p>