Initially, one might think that making a component Public would pose security risks by allowing access to anything and everything. However, this is not necessarily the case.
The primary role of a component's class should be to support the template, rather than creating instances solely to call properties and methods.
When dealing with child components, utilize @Input to access their properties.
For accessing child components and interacting with their properties or methods, consider using @ViewChild
or @ViewChildren
. In a recent experiment, I found that public properties were accessible while private properties were not, except for in specific scenarios.
Can you envision any other potential scenarios where this could apply?