将圆形结构转换为JSON,以便在角度2中进行组件的引用

问题描述 投票:0回答:1

我在使用角度为2的JSON.stringify函数将组件引用转换为字符串时出错。我通过以下代码获取组件的引用:

const factor=this.resolver.resolveComponentFactory(DisplayTextAreaComponent);
const componentRef = this.entry.createComponent(factory);

我得到的错误是将循环结构转换为JSON。在下面的图像链接中,我首先完成了console.log(componentRef),然后显示错误。此图像中显示错误:

json
1个回答
0
投票

看看this答案,它可能会帮助你,也教育你什么循环结构:)。

© www.soinside.com 2019 - 2024. All rights reserved.