2017-04-17 137 views
1

我使用ion-simple-wizard和一些動畫中使用它,這是制約​​PROD環境中創建的構建和投擲的錯誤:
無法創建PROD構建

build prod failed: dirMeta.animations.map is not a function 

其工作在開發環境很好。


+0

您是否嘗試過在這個github上線提供的解決方法? https://github.com/angular/angular-cli/issues/3280 – unitario

+0

你面臨的問題是哪個文件? – Rohit

+0

您提供的鏈接與我的代碼無關@unitario –

回答

1

我也有同樣的問題。將動畫功能直接用於組件文件。就像我在組件中使用此代碼一樣。

animations: [ 
    trigger('WizardAnimations', [ 
     state('enter', style({ position: 'absolute', top: 0 ,width:'100%'})), 
     state('leave', style({ visibility: 'hidden', position: 'absolute', top: 0 })), 
     transition('*=>enter', [ 
      style({visibility: 'visible', opacity: 0, transform: 'scale(0)' }), 
      animate('300ms ease-in', style({ opacity: 1, transform: 'scale(1)' ,top: 0 })) 
     ]), 
     transition('*=>leave', [ 
      animate('300ms ease-out', style({ opacity: 0, transform: 'scale(0)',top: 0 })) 
     ]) 
    ]) 
]//TO DO: Change the animation by @Input for example 

所有最優秀的(Y)

+0

太棒了!爲我工作。 謝謝.. –