moribvndvs / ng2-idle

Responding to idle users in Angular (not AngularJS) applications.
https://moribvndvs.github.io/ng2-idle
Apache License 2.0
315 stars 128 forks source link

fix(issue #77): do not use document and window in SSR #95

Closed sopretty closed 6 years ago

sopretty commented 6 years ago

What kind of change does this PR introduce? (check one with "x")

[x] Bugfix : 

Should be able to run angular project using server side rendering with ng-idle.

What is the current behavior? (You can also link to an open issue here) Issue #77 ps: This PR (https://github.com/HackedByChinese/ng2-idle/pull/90) is working too. Window and document is not defined in angular universal server side.

What is the new behavior? Works with SSR.

Does this PR introduce a breaking change? (check one with "x")

[x] No
coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.005%) to 99.378% when pulling f6ffc7668cfe94ac7607394cdb80fd3875079f26 on sopretty:master into c9d7ce5a7f6b242bbbc099a85e541beab8e9c8cb on HackedByChinese:master.

sopretty commented 6 years ago

I'm closing the PR because the #90 is working well :)