@Component({...})
export class SomeClass{
...
}
host: {
"[@state]":"visible?'expanded':'collapsed'"
},
animations: [
trigger('state', [
state('collapsed', style({})),
state('expanded', style({})),
transition('*<=>*', animate(300))
])
]