2017-04-17 139 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

太棒了!为我工作。 谢谢.. –