Skip to content

Updating local storage  #33

Open
Open

Description

@rahulchavan30

i have a a question ,when my app is working offline ,when offline i fill out few changes
,how do i sink this data when the user is online ..

can i use $scope.viewType = 'ANYTHING';

will this serve my purpose or shud i explicit write a function to write into a variable and pushing to local storage and then getting the data and updating the my LS..

Activity

  1. agrublev commented on Nov 2, 2013

    @agrublev
    Owner

    I would suggest adding a middleman service that can record all the different calls the user is trying to make onto an array... so it would be something like {resource_url:"http://xxx.com/add/user",data:{xxx:'aaa'}}. Then run through the array when you detect internet and keep running each query until the array is empty. Of course make sure to store this array in local storage as well... so whenever u detect internet and the array is not empty keep looping and popping the items off the array on success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions