Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70435

How to parse the json params value and show in page?

$
0
0

@anespa wrote:

Friends,

I am passing some web service taken json value as parameter in ‘NavControl’ and plan to show in 2nd page. But I get that object there . How to parse the json object there to show the data contents.

my function to pass json value is

showDetails(bid,lbid,zone) {
    let buildingBasic = this.propertyProvider.getBuildingBasic(lbid,bid)
    .then(data => {
      this.result = data;
    });

    let buildingDemand = this.propertyProvider.getBuildingDemand(lbid,zone,bid)
    .then(data => {
      this.result = data;
    });
    this.navCtrl.push(this.payPage, {
      param1: buildingBasic,  param2: buildingDemand
    })
  }

typescript file as

export class PayPage {
  param1 : any;
  param2 : any;
  constructor(public navCtrl: NavController, public navParams: NavParams) {
    this.param1 = navParams.data.param1;
    this.param2 = navParams.data.param2;
    //alert(JSON.stringify(this.param2));
  }

pay.html ( not know how to process here)

<ion-content padding>
  <ion-label>Building ID: </ion-label>
  <ion-item>{{param1}}</ion-item>

  <button ion-button>Pay</button>

</ion-content>

Please advise how to parse the parameter data in this html file…

Thanks

Anes

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70435

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>