I have issue in displaying the values from ts to html.
Please find the code snippets below:
HTML:
<ion-list inset>
<ion-item>
<ion-label>Date :</ion-label> {{salesdate}}
</ion-item>
<ion-item>
<ion-label>Sales Type :</ion-label> {{salestype}}
</ion-item>
<ion-item>
<ion-label>Card No.:</ion-label> {{cardno}}
</ion-item>
<ion-item>
<ion-label >Party:</ion-label> {{party}}
</ion-item>
<ion-item>
<ion-label >Godowm:</ion-label> {{godown}}
</ion-item>
</ion-list>
TS:
export class SaleViewPage {
salesdate:string;
salestype:string;
billno:string;
cardno:string;
party:string;
godown:string;
constructor(public navCtrl: NavController, public navParams: NavParams,
private dataservice: DataService) {
this.billno = this.navParams.get('billno');
}
ngOnInit() {
this.loadSales(this.billno);
}
public loadSales(billno){
this.dataservice.getSales(billno).subscribe(result => {
if (result != null)
{
this.salesdate = result.billdate;
this.salestype = result.sname;
this.cardno = result.cardno;
this.party = result.party;
this.godown = result.gname;
}
},
error => {
});
}
I can see in the console log that result has values and the variables are assigned without any issues.
It is the values are not showing in the Page.