I\'m using Ionic 2, in which a component has two components and the data were shared using emitters. But when I execute the program, it comes to this error.
The view is loaded before billItem
is set.
You could use a safe navigation operator ?
.
<ion-input text-right type="text" [value]="billItem?.BillNo" readonly></ion-input> //billItem model has BillNo property
or set it to empty object in the constructor of bill-details.ts:
constructor(...){
if(! this.billItem){
this.billItem={}
}
}