Ionic clickable cards


#1

Hello Ionic Community,

Is it possible to create clickable card in Ionic2? If yes, how?

Thanks.


#2

try

<ion-card (click)="someFunction()" >


#3

Tried it. Getting bunch of exceptions:

browser_adapter.ts:73 EXCEPTION: Error during evaluation of "click"
browser_adapter.ts:73 ORIGINAL EXCEPTION: TypeError: l_context.onCardClick is not a function

and so on.


#4

Never mind. Found the problem. My mistake.

It works. Thanks allpref!


#5

Is there a way to make only part of the card clickable? For example I added a button on top of the card and/or added the button at the bottom of the card and when I click that it trigger the card button. Hope that makes sense.

OFF

#6
(click)=“someFunction($event)”>

where $event is literally $event should work.
$event basically says “this action belongs to me. Not my surroundings.”