cedvdb / ng2draggable

draggable directive for angular 2
https://cedvdb.github.io/ng2draggable/
MIT License
18 stars 16 forks source link

(SystemJS) Can't resolve all parameters for Draggable: (?) #15

Open AndrejB1 opened 7 years ago

AndrejB1 commented 7 years ago

In my Angular 4 project, the error in the title appears. I have tried importing it into several different modules with the same result. Currently it is imported in my shared.module.ts (the parent of the modal class which it is used for).

shared.module.ts:

import { Draggable } from 'ng2draggable/draggable.directive';

@NgModule({ imports: [...],

declarations: [Draggable,...],

exports: [Draggable,...]

}) export class SharedModule { static forRoot(): ModuleWithProviders { return { ngModule: SharedModule, providers: [...] }; } }

DarkSmile92 commented 7 years ago

Did you solve this @AndrejB1 ? I am encountering the same problem right now.

AndrejB1 commented 7 years ago

@DarkSmile92 kind of. If I remember correctly, in the end I just copied the whole file into a local one for my project, and made it a custom directive outside of node_modules. I don't think it needed much tweaking after that. Let me know if that works.