I am new to angular and am still in a learning phase. So , basically i have tons of doubt’s. Still i am using ionic because it just eases the work and am totally interested in learning it.
Before the doubt’s let me explain what i want to achieve.
- Sending data to php file and receiving JSON object from the same request.
- Using that JSON data to populate a list and make it available even when not connected to Internet( caching that object ).
- Updating the cached data like if updated json object is received.
- Backgound geolocation to track even when app is not active. i came accross background geo ngcordova plugin but i need basic example to understand and want to know whether if i use backgrn geo plugin , will i need separate regular geolocation implementation when app is running?( Not reached that point but still its a future requirement).
what i achieved so far
i am able to get json object from a php file but not sending data to it.
populated the list with json data but it needs caching to be implemented.
- I have only one object to be cached so can i achieve that without using any database ? that single record can have many records so i think local storage is not an option(5 MB limit).
- If i use sqlite how to sync the updated json object with existing sql tables?
- I dont think pouch db is an option because i already have a database which is also used for a website.
- On getting parameters from background geolocation and firing a local notification how to decide what page of app will open when user clicks the notification?
I am really confused about the workflow and code structure of the angular to follow to achieve this.
Confusion about in which service/controller should backgrond geo be implemented ?
where to open the db (if i use it) and in what service to sync it ?
how to use sql data to populate the list?
I am not expecting answer for all this doubts lol but atleast a guidance or suggestions on any of the topic above on how to proceed. code templates will be a big help.
SORRY FOR BEING A NOOB