【问题标题】:The animation trigger "transform" has failed to build due to the动画触发器“transform”未能构建,原因是
【发布时间】:2018-08-14 16:54:33
【问题描述】:

当我将 angular/Cli 更新为“@angular/compiler-cli”:“5.0.0”时,请任何人建议我,我遇到了以下错误。

失败:动画触发器“transform”未能构建,原因是 - 提供的动画属性“transform”不是受支持的 CSS pr - 提供的动画属性“transform”不是受支持的 CSS pr

【问题讨论】:

    标签: angular


    【解决方案1】:

    我有同样的错误。我将以下代码添加到 server.ts 以解决此问题。

    Object.defineProperty(document.body.style, 'transform', {
      value: () => {
        return {
          enumerable: true,
          configurable: true
        };
      },
    });

    请看一个文档,该文档必须在此之前定义:

    // https://github.com/angular/universal/issues/830
    const domino = require('domino');
    const fs = require('fs');
    const path = require('path');
    const win = domino.createWindow(template);
    global['window'] = win;
    global['document'] = win.document;

    我从这里采取了解决方案:

    https://github.com/angular/material2/issues/7101

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-10-03
      • 1970-01-01
      • 2011-05-29
      • 1970-01-01
      • 2021-05-17
      • 1970-01-01
      • 2011-07-16
      相关资源
      最近更新 更多