我正在使用 npm install --save angular-tree-component 当我单击父节点时未加载子节点它显示“正在加载...”消息这是我的代码
options: ITreeOptions = {
getChildren: this.getChildren.bind(this)
};
getChildren(node: any) {
debugger
this.TreeService.getChildren((callback) => {
this.asyncChildren = callback;
const newNodes = this.asyncChildren.map((c) => Object.assign({}, c));
return new Promise((resolve, reject) => {
setTimeout(() => resolve(newNodes), 1000);
});
});
}