Created
October 29, 2020 07:46
-
-
Save thisiszoaib/a8d8797cfc8ac431360a2fa49ed6eec6 to your computer and use it in GitHub Desktop.
card flip 4
This file contains hidden or 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
| export class GameCardComponent implements OnInit { | |
| data: CardData = { | |
| imageId: "pDGNBK9A0sk", | |
| state: "default" | |
| }; | |
| cardClicked() { | |
| if (this.data.state === "default") { | |
| this.data.state = "flipped"; | |
| } else { | |
| this.data.state = "default"; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment