_co.viewSingle is not a function

Hello,

I have this function in my Ionic in page

 viewSingle(id: number){
     this.navCtrl.push(PlacePage,{id: id});
  }

which must take the user to another page with id of item

now i’m calling it from the same component template like this

<search-item (click)="viewSingle(item.id)" *ngFor="let item of items" [item]="item"></search-item>

but when i click the item ionic gives me error which

_co.viewSingle is not a function

How i can fix the error?

Hi, @salemcode8

Yes this happened because I think you could not integrate Lazy Loading

and When you save your ts file it was work properly

Thanks

1 Like