question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Synchronization issue

See original GitHub issue

Hello,

When using the decorators, It appears that the synchronization to the session storage and local storage does not happen properly. See below :

import { LocalStorage, SessionStorage} from 'ng2-webstorage';
@Component({
    selector: 'game', 
    templateUrl: 'game.component.html',
    styleUrls: ['game.component.css']
})
export class GameComponent 
{ 
    @LocalStorage("default") private test: number;
     constructor(  ) {
        this.test = 1234;    // Local storage is set to 1234
        //  ....
        // other code
        //  ...

        this.test = 5678;  // Local storage remains at 1234
  }
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

0reactions
GeertJohancommented, Jan 28, 2017

I think this should be in the README/docs. I tried using the decorator on a field which has a class (object0 type, and found that changes to the fields inside that object didn’t converge into the WebStorage. Using the this.foo = this.foo; assignment to trigger the modified accessors works works nicely, but I had to find this issue to get it work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Synchronization Problem - an overview | ScienceDirect Topics
Bipolar code has a synchronization problem when a long sequence of 0s is present in the data. From: Introduction to Digital Communications, 2016....
Read more >
Fix account sync issues - Android Help - Google Support
If your phone is having problems syncing with your Google Account, you could see a message, "Sync is currently experiencing problems.
Read more >
TroubleShooting: Synchronization problems - IBM
This is a troubleshooting guide for synchronization for issues in the IBM® WebSphere® Application Server product. This should help address ...
Read more >
Synchronization (computer science) - Wikipedia
In computer science, synchronization refers to one of two distinct but related concepts: synchronization of processes, and synchronization of data.
Read more >
Synchronization problems in Outlook and OWA - Microsoft Learn
The synchronization issues could result from a corrupted .ost file. Discusses methods to troubleshoot this issue.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found