Open AndrejB1 opened 7 years ago
Did you solve this @AndrejB1 ? I am encountering the same problem right now.
@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.
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: [...]
};
}
}