Hello
I am trying to build following type of functionlity
- Login
- After Successful login , Get All Category List
- Each Category have 500 records pull that records .Like title, image path etc
- 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 ?
Thanks
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:
http://fdietz.github.io/recipes-with-angular-js/consuming-external-services/deferred-and-promise.html
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.