【问题标题】:Unable to create prod build无法创建产品构建
【发布时间】:2017-04-17 09:56:12
【问题描述】:

我正在使用ion-simple-wizard,其中使用了很少的动画,这限制了在 prod 环境中创建构建并引发错误:

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

它在开发环境中运行良好。


【问题讨论】:

  • 您是否尝试过此 github 线程中提供的解决方法? github.com/angular/angular-cli/issues/3280
  • 您在哪个文件中遇到问题?
  • 您提供的链接与我的代码无关@unitario
  • 我认为这与您的代码有关。
  • @Rohit 文件是“ion-simple-wizard-animations.ts”。

标签: angular ionic-framework ionic2


【解决方案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)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-06-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-22
    • 2014-03-02
    相关资源
    最近更新 更多