vendredi 29 janvier 2021

Loading data with ember infinity model

I have a code to load data using infinityModel in my route. Once I get the data from the API I have some more code that needs to be executed. Ex.

  1. return this.InfinityModel('user', . ....).then(users => {
  2. //Some code here
  3. })

For testing, the perPage is set to 4 and there are 8 records. First 4 records are fetched and the entire code gets executed(1 to 3 lines in the above example). Then when I scroll down in the UI, the api call is made and the next set of records are retrieved, however the extra code line 2 - "//Some code here" does not get executed. Is there a way to get the entire block of code to execute rather than just loading the subsequent set of data. Thanks in advance...




Aucun commentaire:

Enregistrer un commentaire