cardClicked() is not a function

I wrote this function to navigate from one page to another by simply clicking the card but i keep getting the is not a function error

Here is my sample code Home.html

<ion-title>

</ion-title>
<ion-item  no-lines>
    <ion-avatar item-end >
      <img src="../../assets/photos/14171056001.jpg">
    </ion-avatar>
    <h2>Ali Salim</h2>
    <p>Mbezi beach, Dar es Salaam</p>
</ion-item>


<**ion-card  (click)=  "cardClicked()"**>


    <ion-card-header>
 Payments     
    </ion-card-header>
  
    <ion-card-content>

    </ion-card-content>
  
  </ion-card>

  <ion-card>

      <ion-card-header>

List your Space

      <ion-card-content>

      </ion-card-content>
    
    </ion-card>



    <ion-card>

        <ion-card-header>

Settings

        <ion-card-content>
  
        </ion-card-content>
      
      </ion-card>


      
    <ion-card>

        <ion-card-header>

Help

        <ion-card-content>
  
        </ion-card-content>
      
      </ion-card>



      
    <ion-card>

        <ion-card-header>

Feedback

        <ion-card-content>
  
        </ion-card-content>
      
      </ion-card>

home.ts file:

import { NavController } from ‘ionic-angular’;
import { PaymentsPage } from ‘…/payments/payments’;

@Component({
selector: ‘page-contact’,
templateUrl: ‘contact.html’
})
export class ContactPage {

constructor(public navCtrl: NavController) {

}
cardClicked(){
this.navCtrl.push( PaymentsPage)

  }


  onSearch(event){
    console.log(event.target.value);
  }
  }

Are those ** with the ion-card a layout issue here or a weird thing in your layout?
Eitherway: delete them.

I would also remove the spaces between (click)= and cardClicked()".
Not sure if that’s an error, but it would certainly help to remove the spaces.

did you check app on device?

i was trying to highlight where the function is at…but they are not present in the original code please disregard them

Thanks, i have already solved it… i guess there was something wrong with my machine…after i restarted it worked fine

It happens all the time not only for cards but for anything. Just a way around is press ctrl + C and break the localhost on CLI. Then do ionic serve. That’s it.