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

Can I share data stored using ngrx/db between 2 different tabs in the same browser? if yes how? #495

Closed
daBishMan opened this issue Oct 17, 2017 · 3 comments

Comments

@daBishMan
Copy link

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Feature request
[x] Documentation issue or request

What is the current behavior?

We have an ng4, ngrx 4 application, we have a need when the user clicks on profile we need to open the profile in a new tab. I am not sure if I can share the data or how.

Basically I want to maintain the state between the 2 or more tabs, I am open to using ngrx/db as long as I can keep it as long as those tabs are open.

Expected behavior:

It would be great if I can do that.

Minimal reproduction of the problem with instructions:

Version of affected browser(s),operating system(s), npm, node and ngrx:

Other information:

@agborkowski
Copy link

https://github.com/ngrx/platform/blob/master/example-app/README.md

"This application utilizes @ngrx/db to persist the collection across sessions; @ngrx/store to manage the state of the app and to cache requests made to the Google Books API; @angular/router to manage "

@dinvlad
Copy link
Contributor

dinvlad commented Oct 17, 2017

You can do it through localStorage, using btroncone/ngrx-store-localstorage#40 (comment) for example. DB would probably be a bit more appropriate for that, but I'm not sure how well-supported it is at the moment (unlike localStorage).

@daBishMan
Copy link
Author

Thank you @agborkowski and @dinvlad for your feedback.

@dinvlad I will take a closer look at your code in the comment, thank you.

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

No branches or pull requests

3 participants