Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.

how to handle DOM api with universal #112

Closed
kuldeepkeshwar opened this issue Jun 23, 2016 · 1 comment
Closed

how to handle DOM api with universal #112

kuldeepkeshwar opened this issue Jun 23, 2016 · 1 comment

Comments

@kuldeepkeshwar
Copy link
Contributor

how to handle use-cases related to DOM API

  • cookies (read/write)
  • localStorage

there can be scenarios where one have to read/write cookies .
Right now while server-side rendering document object is not available

@jeffwhelpley
Copy link

We have discussed this in other issues, but to recap:

universal service is a feature request:
angular/universal#309

use DI swapping for abstracting out localStorage and some equivalent (redis, etc.) on the server side.

for accessing cookies on the server side, get a handle to the request with Zone.current.get('req'). this will be improved in the future.

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

No branches or pull requests

2 participants