ng2draggable
ng2draggable copied to clipboard
ReferenceError: TouchEvent is not defined
I get this error when I add the directive.
ReferenceError: TouchEvent is not defined
I ran into this problem with Safari. I ended up copying the ng2-draggable.directive.ts file over to my source code and imported it as a regular directive. Every line that had event:TouchEvent
, I changed to event: TouchEvent | any
.
This has worked for me.
Edit: This might not work for you since the Safari error was something like unknown variable TouchEvent