Use camel case for CSS attribute Angular animation style
:
animations: [
trigger('openClose', [
// ...
state('open', style({
height: '200px',
opacity: 1,
backgroundColor: 'yellow', // <-- camel case
borderRadius: '10px' // <-- camel case
})),
state('closed', style({
height: '100px',
opacity: 0.5,
backgroundColor: 'green', // <-- camel case
borderRadius: '50px' // <-- camel case
})),
transition('* => closed', [
animate('1s')
]),
transition('* => open', [
animate('0.5s')
]),
]),
],