Charts 标签/节点中的angular2和zingchart未标记(承诺中)

Charts 标签/节点中的angular2和zingchart未标记(承诺中),charts,angular,angular-promise,zingchart,Charts,Angular,Angular Promise,Zingchart,我在angular2应用程序中使用zingchart,遇到了这个问题。 当我尝试单击节点时-我得到: angular2.dev.js:23730异常:错误:未捕获(承诺中):TypeError:无法读取null的属性“parentNode” 当我在调试模式下尝试做同样的事情时,也就是说,当从一行跳到另一行时,做得慢一些,一切都很好 我读了很多关于未破坏(承诺)的文章:TypeError:here,并尝试了一些解决方案,但没有成功。 也许有人对我有什么想法? 谢谢 我有一个饼图: 其中包含以下代码

我在angular2应用程序中使用zingchart,遇到了这个问题。 当我尝试单击节点时-我得到:

angular2.dev.js:23730异常:错误:未捕获(承诺中):TypeError:无法读取null的属性“parentNode”

当我在调试模式下尝试做同样的事情时,也就是说,当从一行跳到另一行时,做得慢一些,一切都很好

我读了很多关于未破坏(承诺)的文章:TypeError:here,并尝试了一些解决方案,但没有成功。 也许有人对我有什么想法? 谢谢

我有一个饼图: 其中包含以下代码:

render(){
  this.zone.runOutsideAngular(() => {
      zingchart.render({
          id : this.chart['id'],
          data : this.chart['data'],
          width : this.chart['width'],
          height: this.chart['height']
      });

      zingchart.node_click = function(p) {
          window.location.href = #/resources";
      }
 });}
我的资源组件非常简单:

import { Component } from 'angular2/core';
   @Component({ 
           selector: 'resources-component',
           templateUrl: `I am the resource page`,
    })
    export class ResourcesComponent {
          title: string = 'resources';
          constructor() {
         }
    }

你能用小提琴来复制它吗?它在一个小POC中对我有效。另外,不确定这是否是您的问题和/或代码中的输入错误,而是您对window.location.href=#/resources的回调"; 缺少引用。谢谢@mike schultz问题在于动画。当我删除动画部分时,一切都正常。你能用小提琴复制它吗?它在一个小POC中对我有效。另外,不确定这是否是您的问题和/或代码中的输入错误,但您对window.location.href=#/resources”的回调缺少一个引号。谢谢@mike schultz,问题在于动画。当我删除动画部分时,一切都正常了。