Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229670

GET request result display on application

$
0
0

ok, you just need to tell the code to generate a section per document in the docs array
assuming the variable in the the ts is

var docs: any;

and you converted the json to a array of objects

this.historyService.status(this.statusReport).then((result) => {
        console.log(result);
        docs=JSON.parse(result);

then

 <ion-list>
      <ion-item *ngFor="let document of docs">
          <h2>{{document.data_reportid}}</h2>
          <h3>{{document.data_category}}</h3>
          <h4>{{document.time}}</h4>
          <p>{{document.data_address}}</p>
      </ion-item>
    </ion-list>

if u want that separator line, you will have to add another html element to generate that inside the ion-item


Viewing all articles
Browse latest Browse all 229670

Trending Articles



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