0
How do I use variables from an Angular component in the following context? In a component I have a variable that is an array of a class created in that same component, this variable controls the selected items in a list, follows the component code:
test: ClasseCriada[]
In the HTML of this same component I speak an Ngif to take the selected items and change the display, thus test.length >= 1
It turns out that I have to use this same Ngif in another component, but HTML accuses error that the length property cannot be accessed because it is not a property.
Trying to solve I used the decorators @Output and @Input but it didn’t work because they are components that are in the same hierarchy and not father and son.