Hello ! Guys have a question, there are 4 buttons, and on the main page there are 4 blocks, with each click I need fadeIn to get the first block and the rest to hide, then the second and so on.
The problem is that when you press the first button, the first block hides in its place and the second block jumps to the first, here’s the code:
animations: [ trigger('anyState', [ state('inactive', style({ opacity: '0.0', transform: 'scale(0.0)', display: 'none' })), state('active', style({ opacity: '1.0', transform: 'scale(1.0)', display: 'block' })), transition('inactive => active', animate('1000ms ease-in')), transition('active => inactive', animate('1000ms ease-out')) ]), I want to get a result so that when the second button is clicked, the second block appears in the same place as the first block, and it turns out that when I click on the second button, the first block hides smoothly and then the second one jumps into the first one.
Help solve this problem, please!