I don't really know how to do this, so I come to see if anybody has faced this problem before. I'm working over Ionic, but maybe this isn't a major problem if you're used to make animations.
Well, this is my animation is meant to do, fluently:
after click:
Well, as I don't know how many items I will be showing, I can't select a fixed "height" amount in my animation:
animations: [
trigger('openItem', [
state('closed', style({
height: "0px",
opacity: 0
})),
state('opened', style({
height: "auto",
opacity: 1
})),
transition('* => *', animate('.35s'))
])
]
Choosing "auto" will change between states violently, not showing the animation in a fluent way. I would want to set that "height" value dynamically: each one of my rows is 30px tall, so I could calculate the length of the array I'm passing in, multiplicate it by 30, and pass that value to the animation.
But... is there any way to do so? Which other solution would you recommend me, otherwise?
Thank you!