These are chat archives for angular/angular-2-ionic-2

20th
Sep 2018
tasoskak
@SirukakSosta
Sep 20 2018 16:43

Hi guys, Im developing an app basic adding tags to some activities. Ive made a node api that handle the requests.

My main problem is that i want this app to work offline.
Lets say that if im offline i want to create 5 activities. Ive done that by keeping an array of http requests and exectuing them when the mobile is back online.

But when i want to create a tag for a specific activity, in order to create a connection between them i need to have the activity id and tag's id.

So my main question is, how i can keep this logic to execute it when back online.
For example in promises this will be in pseudocode is:

  1. post(activity) - then( res['id']
  2. post(tag) with post's id