import {trigger,style,state,animate,transition,keyframes,group} from ‘@angular/animations‘;
@Component({
animations :[
trigger(‘openClose‘,[
state(‘open‘,style({
height:‘200px‘,
width:‘100%‘,
opacity:1,
})
),
state(‘closed‘,style({
height:‘0px‘,
width:‘100%‘,
opacity:0.5,
})
),transition(‘open => closed‘,[
animate(‘1s‘)
]),transition(‘closed => open‘,[
animate(‘1s‘)
])
])
]
})