angular2-draggable icon indicating copy to clipboard operation
angular2-draggable copied to clipboard

angular2-draggable doesn't work in lazy loaded modules

Open uberspeck opened this issue 5 years ago • 1 comments

I can't get it to work in lazy loaded modules.

https://stackblitz.com/edit/ngdraggable-lazy-load

uberspeck avatar Nov 10 '18 23:11 uberspeck

@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 { }

xieziyu avatar Nov 11 '18 12:11 xieziyu