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

Pass NgRx State from Server -> Client #29

Closed
MarkPieszak opened this issue Dec 14, 2016 · 4 comments
Closed

Pass NgRx State from Server -> Client #29

MarkPieszak opened this issue Dec 14, 2016 · 4 comments

Comments

@MarkPieszak
Copy link
Member

MarkPieszak commented Dec 14, 2016

Currently we have NgRx Store on the Server, but we need to pass these easily to the client, then initialize the Store with those values. This way if someone uses the Store to handle a lot of their application they can transfer cache/state here instead.

This is another option as opposed to HttpCacheService.

(Could be connected with ngrx/store#294)

@MarkPieszak MarkPieszak changed the title Add NgRx on the Server to pass Redux State to Client Pass NgRx State from Server -> Client Dec 14, 2016
@MarkPieszak MarkPieszak self-assigned this Dec 14, 2016
@MarkPieszak MarkPieszak added this to the 1.1-Angular4.x milestone Jan 23, 2017
@pjmagee
Copy link

pjmagee commented Jun 28, 2017

@MarkPieszak Is this still a problem for being able to add ngrx store rehydration/hmr ngrx store rehydration to the template?

@MarkPieszak
Copy link
Member Author

I have an example of how it can be used with HttpTransfer and everything let me find it.

@pjmagee
Copy link

pjmagee commented Jun 28, 2017

I've currently gone through migrating our application from the old Angular2 template to this current template on Master, however we are now using ngrx and ngrx effects for our api, user state, however I'm still pretty new to the angular/js world and I've been struggling to figure out how to rehydrate...a little mockup would be awesome 👍

@MarkPieszak
Copy link
Member Author

MarkPieszak commented Jun 29, 2017

@pjmagee
You can see it here in this PR, it'd be along these lines.
https://github.com/MarkPieszak/aspnetcore-angular2-universal/pull/259/files

Hope that helps!

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

No branches or pull requests

2 participants