2016-09-06 5 views
1

角度2 IBMアカデミーcompillerアニメーションコールバック:このように見て私は<em>コンポーネント</em>は次のように定義されているエラー

@Component({ 
    moduleId: module.id, 
    templateUrl: 'my.template.html', 
    animations: [ 
     trigger('fadeInOut', [ 
     state('in', style({opacity: 1})), 
     transition('void => *', [ 
      style({ 
       opacity: 0 
      }), 
      animate(500) 
     ]), 
     transition('* => void', [ 
      animate(500, style({ 
       opacity: 0 
      })) 
     ]), 
    ]) 
    ] 
}) 
export class MyComponent implements OnInit, OnDestroy { 
    public stage: number = 0; 
    ... 
    transitionDone(transitionEvent: any): void {...} 
    ... 
} 

、テンプレート:JITコンパイルを使用している場合

<div 
    *ngIf="stage" 
    @fadeInOut 
    (@fadeInOut.done)="transitionDone($event)" 
></div> 

アプリケーションが正常に動作、およびdone コールバックは正しく起動されますが、ngc(v。0.6.0)を使用してコンパイルしようとすると、miにエラーが発生します:

指定されたパラメータは、コール対象のシグネチャと一致しません。私は、テンプレートから行わコールバック、コンパイルの作品を削除した場合

this.registerAnimationOutput(
    this._el_0, 
    new import24.AnimationOutput('fadeInOut','done'), <-- should be 3 args 
    this.eventHandler(this._handle__fadeInOut_done_0_1.bind(this)) 
); 

:それはAnimationOutputのパラメータの間違った番号を持つngfactoryファイルを生成するので

それはです。私は

答えて

0

アップデート角度2 RC.6を使用してい

:それは「2.0.2」は、私は同じ問題を抱えてい

が、そこに見える角度に取り組んでいるが、角度のアニメーションで内部バグですまたはAOTコンパイラ。

現在の進行状況を追跡することができます。https://github.com/angular/angular/issues/11707

+1

はい、実際に私は、私もに同じ問題をお待ちしております:) –

+0

m.cichacz良い仕事@ 3週間以上、ここでの応答を取得していない後に、この問題を作成しました解決される:) –

関連する問題