How to handle multiple Https Request?


I am trying to build following type of functionlity

  1. Login
  2. After Successful login , Get All Category List
  3. Each Category have 500 records pull that records .Like title, image path etc
  4. Each Records have their detail page as well.

How to proceed with this kind of application in better approach.

So performance will be very good. I need to store this type of data locally for offline access.

My backend is written in PHP + Mysql ?


You can learn more about $http and promises.
Usually in your case, I would do some promises, this will help me ensure that the next request will be done once the initial http request is finished.

Here’s a simple article w/ code samples:

Probably you need a SQL on your app and you need to sync Mysql to your app, but this is a general hint, exact solution depends to many parameters.
Without knowing nothing about your data, maybe the best is: after login, you can download all category with basic record informations, then download full record info only when the user go to the detail page. You can also start with a set of data already shipped with your app. The big problem is maintain synchronization.