Closed ilueckel closed 4 years ago
Merging #72 into master will increase coverage by
0.19%
. The diff coverage is90%
.
@@ Coverage Diff @@
## master #72 +/- ##
==========================================
+ Coverage 63.22% 63.42% +0.19%
==========================================
Files 10 10
Lines 416 421 +5
Branches 56 57 +1
==========================================
+ Hits 263 267 +4
Misses 125 125
- Partials 28 29 +1
Impacted Files | Coverage Δ | |
---|---|---|
src/directives/dropzone.directive.ts | 72.46% <90%> (+0.58%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 109e40e...e183401. Read the comment docs.
Hi @ilueckel , You will need to add some polyfills like this in sever.ts:
const win = domino.createWindow(template);
global['window'] = win;
global['navigator'] = win.navigator;
global['Event'] = win.Event;
You could do that - but it's another (useless) dependency in your build step. And even worse: Even if you integrate domino the result is, well, useless. Because you don't need server side drag-and-drop events on this control. It all happens in the users browser. This also would not be an out-of-the-box solution for Angular builds.
Okay, here we go !
Fixed
NgxDragAndDropDirective
breaking SingleSiteRendering (SSR) in Angular universal. Using@HostListener
breaks Angular universalSo I removed all Event-Types and
@HostListener
s, injected the platform ID and added event listening viaRenderer2
when the platform is a browser.