-
Notifications
You must be signed in to change notification settings - Fork 482
Proposal: window service #828
Comments
Wouldn't it be better to just provide a It seems better to provide a catch-all implementation than to patch certain services. It would also encourage Angular users to avoid using |
jsdom would be a replacement for domino since it does the whole DOM, therefore that's not an option. |
We wouldn't use |
I havn't look at their imp but how would things like localStorage and other storage API's work? (the original reason for this). |
jsdom doesn't have LocalStorage, but there are other implementations around that we could patch this with, e.g. node-localstorage. My general suggestion, though, is that we shouldn't have an "a la carte" option, it should just be a catch-all. |
I found this issue thanks to this one: angular/universal-starter#189
edit: oh wait. I imported hammerjs in main.ts and now it is working. |
superseeded by #992 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
TLDR: A pluggable service that provides a consistent pattern for providing services that usually exist on
window
across platforms that are Universal compatible.API
We'll provide a module that provides services that noop out the api's such as localstorage since it doesn't make any sense for that to work on the server, but in a way that it will be Universal compatible.
Pluggable
You can provide your own implementations for the services found inside the WindowService like so
draft imp here https://github.com/Toxicable/universal/blob/local-storage/modules/common/src/local-storage/local-storage.ts
The text was updated successfully, but these errors were encountered: