How to get the positions of nodes of TreeNode of pTree in Angular as per the hierarchial order in which they are displayed?
I am having data of type TreeNode and in the data I am also having children, branched children, any number of branching. How to access these nodes as per the hierarchial order, suppose child1 is a child of Children and Children is child to root 'Root'. So the position of child2 is="Root.Children.child1".
**export interface TreeNode {
label?: string;
child?: [TreeNode];
}**