我有一个Ionic应用程序(运行Angular 4),在一个 View 中,我想使用typeform embed sdk嵌入一个字体。由于某些原因,添加以下代码会导致区域错误:

Error: Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.
Most likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)

为简单起见,我启动了new app in StackBlitz,它显示了相同的错误。相关代码如下:
ionViewDidLoad() {
  let el = this.typeform.nativeElement;

    typeformEmbed.makeWidget(
      el,
      'https://developerplatform.typeform.com/to/Xc7NMh', // NOTE: Replace with your typeform URL
      {
        hideHeaders: true,
        hideFooter: true,
        opacity: 75,
        buttonText: "Take the survey!",
        onSubmit: function () {
          console.log('Typeform successfully submitted')
        }
      }
    )
}

有什么想法为什么我什至在应用加载之前就看到了这个错误?

最佳答案

尝试0.7.1版:npm install --save @typeform/[email protected]

关于ionic-framework - Ionic App中的Typeform导致zone.js失败,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/58066600/

10-11 01:21