<ng-container *ngFor="let child of root.getChildren()">
<ng-container id="prefix" *ngIf="hasPrefix(child)">
{{getPrefix(child)}}
</ng-container>
</ng-container>
I am just learning angular. I don't have much experience with angular. Please feel free to correct me if I am wrong.
I have a tree data structure, where I have to traverse through the tree and print the prefix of child nodes. But the prefix is a private property. What is the best practice in angular to access the private properties in the view component? The above code leads to multiple method calls as there will be a change detected during recursion.
Thanks in advance.