angular2gridster
angular2gridster copied to clipboard
ERROR TypeError: Object(...) is not a function
ERROR TypeError: Object(...) is not a function at new Draggable (angular2gridster.js:3513) at GridsterItemPrototypeDirective.enableDragDrop (angular2gridster.js:4922) at eval (angular2gridster.js:4796) at ZoneDelegate.invoke (zone.js:388) at Zone.run (zone.js:138) at NgZone.runOutsideAngular (core.js:4708) at GridsterItemPrototypeDirective.ngOnInit (angular2gridster.js:4795) at checkAndUpdateDirectiveDynamic (core.js:12440) at checkAndUpdateNodeDynamic (core.js:13957) at checkAndUpdateNode (core.js:13881)
Hi, which version of angular2gridster do you use? Template with controller configuration would be helpful.
I noticed that in your component your imports use relative paths to "node_modules" directory. Can you change:
import { GridsterComponent, IGridsterOptions, IGridsterDraggableOptions } from '../../../node_modules/angular2gridster';
to
import { GridsterComponent, IGridsterOptions, IGridsterDraggableOptions } from `angular2gridster';
Remember to also import the GridsterModule in your app module:
import { GridsterModule } from 'angular2gridster';
...
@NgModule({
...
imports: [
...
GridsterModule.forRoot()
]
})
export class AppModule { }
Let me know if this solves your problem. If not I will investigate it further.