Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listen for change event for bound values #167

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DaveWM
Copy link

@DaveWM DaveWM commented Nov 6, 2014

When you call localStorageService.bind, an event listener is now
registered that is fired when the value of the local storage key
changes, which updates the value and calls scope.$apply(). fixes #166

When you call localStorageService.bind, an event listener is now
registered that is fired when the value of the local storage key
changes, which updates the value and calls scope.$apply().
@DaveWM DaveWM changed the title Listen for change event for bound values #166 Listen for change event for bound values Nov 6, 2014
@coveralls
Copy link

Coverage Status

Coverage increased (+0.43%) when pulling 9aed911 on DaveWM:master into 3c5e2ec on grevory:master.

@YouriT
Copy link

YouriT commented Nov 25, 2014

Would appreciate to have that feature also :)

When local storage for a bound object is updated, it now extends the
current object as opposed to overwriting it (this is to preserve
unserializable properties, e.g. functions)
@coveralls
Copy link

Coverage Status

Coverage increased (+0.58%) when pulling 98fd70b on DaveWM:master into 3c5e2ec on grevory:master.

@a8m
Copy link
Collaborator

a8m commented Dec 31, 2014

Further to your comment @DaveWM, thanks for the PR, I'll take a look later.

@tiagoroldao
Copy link
Contributor

Are changes still required here? I wanted to start work on this, but saw the PR already existes for this functionality.

@bnbon
Copy link

bnbon commented Mar 30, 2015

+1 for this feature.

@windom
Copy link

windom commented May 29, 2015

+1 too :)

@STRML
Copy link

STRML commented Jul 15, 2015

This won't actually work because storage events are only fired on other windows/tabs, not the window/tab originating the event. I've modified the PR to listen to internal events to do this instead, which seems to be working fine.

@eperret
Copy link

eperret commented Oct 31, 2015

+1 as well

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

Successfully merging this pull request may close these issues.

Watch for changes in local storage
9 participants