xieziyu / angular2-draggable

Angular directive (for version >= 2.x ) that makes the DOM element draggable and resizable
https://xieziyu.github.io/angular2-draggable/
293 stars 103 forks source link

Not compiling after installing angular2-draggable in ionic #106

Open MalinPramoditha opened 6 years ago

MalinPramoditha commented 6 years ago

Typescript Error: Type 'ElementRef' is not generic.

node_modules/angular2-draggable/lib/angular-resizable.directive.d.ts: constructor(el: ElementRef < HTMLElement > , renderer: Renderer2);

xieziyu commented 6 years ago

@MalinPramoditha Please check your angular version. If it's <= 6.0, you need to downgrade angular2-draggable to v1.4.2. Or you can upgrade angular to latest version.

jayapalagowda77 commented 5 years ago

Same Error npm install angular2-draggable@1.4.2 --save

Below ERROR :

angular-resizable.directive.d.ts

ERROR in node_modules/angular2-draggable/lib/angular-resizable.directive.d.ts(81,21): error TS2315: Type 'ElementRef' is not generic.


I'm using angular version

Angular CLI: 1.7.4 Node: 8.9.4 OS: win32 x64 Angular: 5.2.11 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router

@angular/cli: 1.7.4 @angular-devkit/build-optimizer: 0.3.2 @angular-devkit/core: 0.3.2 @angular-devkit/schematics: 0.3.2 @ngtools/json-schema: 1.2.0 @ngtools/webpack: 1.10.2 @schematics/angular: 0.3.2 @schematics/package-update: 0.3.2 typescript: 2.5.3 webpack: 3.11.0

Please help to resolving the issue.

Thanks