Angular Universal error
See original GitHub issueDescribe the bug I am seeing an issue with running angular-calendar using Universal/SSR. The specific issue is one step lower with the angular-draggable-droppable package where it is failing to find a definition for window, which is to be expected on Universal.
Minimal reproduction of the problem with instructions N/A Applies to Universal only, not sure that I can do a Stackblitz with universal.
Screenshots `/Users/User/Projects/project/website/node_modules/angular-draggable-droppable/bundles/angular-draggable-droppable.umd.js:118 for (var i = 0, limit = prefix.length; i < limit && !window.requestAnimationFrame; ++i) { ^
ReferenceError: window is not defined at /Users/User/Projects/project/website/node_modules/angular-draggable-droppable/bundles/angular-draggable-droppable.umd.js:118:57 at /Users/User/Projects/project/website/node_modules/angular-draggable-droppable/bundles/angular-draggable-droppable.umd.js:141:3 at createCommonjsModule (/Users/User/Projects/project/website/node_modules/angular-draggable-droppable/bundles/angular-draggable-droppable.umd.js:19:36) at /Users/User/Projects/project/website/node_modules/angular-draggable-droppable/bundles/angular-draggable-droppable.umd.js:109:35 at /Users/User/Projects/project/website/node_modules/angular-draggable-droppable/bundles/angular-draggable-droppable.umd.js:2:82 at Object.<anonymous> (/Users/User/Projects/project/website/node_modules/angular-draggable-droppable/bundles/angular-draggable-droppable.umd.js:5:2) at Module._compile (module.js:652:30) at Object.Module._extensions…js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12)`
Versions
@angular/core
: 6.1.7angular-calendar
: 0.27.8- Browser name and version: macOS / Chrome 74.0.3729.169
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:25 (5 by maintainers)
Top GitHub Comments
It works!
Hi @mattlewis92, thank you a lot. The fix works. I am able to render calendar with SSR.