I’m currently working on a group project to make a checkers game.
I’m trying to make a custom image (my checker piece) a button.
Here’s what the code looks like :
ion-col width-12.5 class=“wh”>
img *ngSwitchCase=" gameState=‘B’" src="…/…/assets/BlackRealistic.png">
img *ngSwitchCase=“gameState=‘R’” src="…/…/assets/RedRealistic.png">
The idea I’m trying to express is that given a certain value in the gameState array, the template loads a different resource. Obviously they’re currently images, but is there any way to use that particular asset as a button in the div?