Reputation: 95
Basically what i need to know is is there a way to calculate the height of the component that is dynamically created from the recursive tree. So obviously i cannot use tree inside my metadata declarations but i can calculate it height inside the *ngStyle directory like this
<my-directory [directory]='childDirectory' *ngStyle={'max-height:calcMaxHeight(childDirectory)><my-directory>
So let`s say my animations state is going to change the max height from one calculated by *ngStyle directive to 0, to create the slideUp effect. But is there a way to access the value, previously calculated, inside animations metadata.
Upvotes: 0
Views: 121
Reputation: 95
It is possible to use the '*' to access the element dimensional properties. Here is the article that explains it.
Upvotes: 0