I've been attempting to create a button that navigates to another page while passing an object in the parameters. However, I keep encountering an error message:
"co. is not a function."
It's perplexing because I receive the same error when trying to utilize alert
, console.log
, or any other functions.
This is the HTML code for the page:
<ion-header>
<ion-navbar>
<ion-title>SearchResults</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<ion-list>
<ion-item *ngFor= "let item of resultArray;">
<img src={{item.thumbnail}} />
<p>{{item.title}}</p>
<button bookDetail (click)="console.log(\"Even some text, please?\")">DETAIL</button>
</ion-item>
</ion-list>
</ion-content>