title: Angular 2, animation trigger has not been registered
body: <p>It's the first time I work with Angular 2 animation and I have a little problem with implementation. I used the Angular guide but I have the following error : </p>
  
  <pre><code>ERROR Error: The provided animation trigger "menubarState" has not been 
  registered!
  at AnimationTransitionNamespace._getTrigger (transition_animation_engine.js:239)
  at AnimationTransitionNamespace.trigger (transition_animation_engine.js:262)
  at TransitionAnimationEngine.trigger (transition_animation_engine.js:896)
  at InjectableAnimationEngine.AnimationEngine.process (animation_engine_next.js:146)
  at AnimationRenderer.setProperty (animation_renderer.js:500)
  at DebugRenderer2.setProperty (services.js:1206)
  at setElementProperty (element.js:386)
  at checkAndUpdateElementValue (element.js:308)
  at checkAndUpdateElementInline (element.js:243)
  at checkAndUpdateNodeInline (view.js:468)
  </code></pre>
  
  <p>My component code:</p>
  
  <pre class="lang-js prettyprint-override"><code>import { Component } from '@angular/core';
  import { trigger, state, transition, style, animate } from 
  '@angular/animations';
  
  @Component({
    selector: "rendez-vous",
    templateUrl: "./composants/rendezVous/rendezVous.html",
    styleUrls: ["./composants/rendezVous/rendezVous.css"],
    animations: [
      trigger("menubarState", [
      state('in', style({height: '*'})),
      transition('* =&gt; void', [
        style({height: '*'}),
      animate(250, style({height: 0}))
      ])
    ])]
  })
  export class rendezVousComposant {
  
  etatAffichage : string = "off";
  
  gestionAffichage () {
    this.etatAffichage = 'in';
  }
  }
  </code></pre>
  
  <p>My html code :</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div class="rendezVous"&gt;
  &lt;div (ngClick)="gestionAffichage()"&gt;Afficher&lt;/div&gt;
  &lt;div [@menubarState]="etatAffichage"&gt;...&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My dependencies :</p>
  
  <pre class="lang-json prettyprint-override"><code>"dependencies": {
      "@angular/common": "5.0.3",
      "@angular/compiler": "5.0.3",
      "@angular/core": "5.0.3",
      "@angular/platform-browser": "5.0.3",
      "@angular/platform-browser-dynamic": "5.0.3",
      "reflect-metadata": "^0.1.10",
      "rxjs": "^5.4.0",
      "systemjs": "^0.20.13",
      "zone.js": "^0.8.12"
      },
      "devDependencies": {
      "@types/core-js": "^0.9.41"
  }
  </code></pre>
  
  <p>Thanks for your help</p>