我需要在我的项目中使用angular 7在其上使用treenode。在treenode中单击子级时,它应该加载一个组件。有可能吗?
我在项目中使用了primeng树结构:
"data": [{
"label": "Visit 1",
"data": "Documents Folder",
"expandedIcon": "fa fa-building-o green",
"collapsedIcon": "fa fa-building-o green",
"selectable": false,
"expanded": true,
"children": [ {
"label": "Prescreening",
"data": "Documents Folder",
"expandedIcon": "fa fa-briefcase gold",
"collapsedIcon": "fa fa-briefcase gold",
"selectable": true
}, {
"label": "Clinical Observations",
"data": "Documents Folder",
"expandedIcon": "fa fa-briefcase gold",
"collapsedIcon": "fa fa-briefcase gold",
"selectable": true
}, {
"label": "Notes",
"data": "Documents Folder",
"expandedIcon": "fa fa-briefcase gold",
"collapsedIcon": "fa fa-briefcase gold",
"selectable": true
}, {
"label": "Claims",
"data": "Documents Folder",
"expandedIcon": "fa fa-briefcase gold",
"collapsedIcon": "fa fa-briefcase gold",
"selectable": true
} ]
} ]
当我单击一个孩子时(例如,如果我单击预筛选),它应该加载我的项目中已经存在的组件。