angular2-draggable
angular2-draggable copied to clipboard
angular2-draggable doesn't work in lazy loaded modules
I can't get it to work in lazy loaded modules.
https://stackblitz.com/edit/ngdraggable-lazy-load
@uberspeck
You need to import AngularDraggableModule in your lazy.module.ts
:
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule, Routes } from '@angular/router';
+ import { AngularDraggableModule } from 'angular2-draggable';
import { LazyComponent } from './lazy.component'
const routes: Routes = [
{
path: '',
component: LazyComponent
}
];
@NgModule({
imports: [
CommonModule,
+ AngularDraggableModule,
RouterModule.forChild(routes),
],
declarations: [LazyComponent]
})
export class LazyModule { }