Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<div [@detailExpand]="shouldExpand ? 'expanded' : 'collapsed'">
Test
</div>
@Component({
selector: 'foo',
templateUrl: './ep.html',
animations: [
trigger('detailExpand', [
state('collapsed', style({
height: '0',
minHeight: '0',
})),
state('expanded', style({ height: '*' })),
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
]),
],
})
export class Foo {
shouldExpand = fase;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment