Some time ago I’ve been struggling with mapping hierarchical data structure in angular. Labels hierarchy was complex (like 4 levels deep with multiple parents, multiple children, basically graph like structure with some logic behind it). In the end it was/is still working but that’s the best I can say about it.
Page object pattern is common practice when writing automated tests using selenium. It allows to gather all possible operations on the page in one place and hide page implementation details from test case. Page object pattern can be used in the same way for angular directives, react and [put framework name here] components.