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

How to limit the result coming from API in IONIC 3

$
0
0

@harshm90 wrote:

I am working on a project where I have to make a HTTP call in which I get a array of result whose length is 60+ and it takes a lot of time to load.

How can I limit the result & display the list of 20 array at first load and on scrolling down the other 20 and so on?

This is my .ts file

getUserList() {
        this.showLoader();
        this.authService.getData(this.search, "search")
          .then((result) => {
            let yourString = typeof result == 'object' && result["_body"] ? result["_body"] : [];
            let res = yourString.substring(1, yourString.length - 1);
            this.hideLoader();
            this.response = JSON.parse(res);
            console.log(this.response);
          }, (err) => {
            console.log(err);
          });
      }

this is the console.log(this.response)

50%20AM

How can i achieve this?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles



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