Created
May 1, 2020 13:56
-
-
Save benjamincharity/62a2d70f3d31c4d953afaab4a4fc7018 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div [@detailExpand]="shouldExpand ? 'expanded' : 'collapsed'"> | |
Test | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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