Greetings, Trying to get Dragula to work on 2.0.x See below what I have so far. Not even dragging is working.
app.module.ts:
import {DragulaModule, DragulaService } from "ng2-dragula/ng2-dragula";
...
imports: [
IonicModule.forRoot(MyApp)
DragulaModule
],
...
providers: [{provide: ErrorHandler, useClass: IonicErrorHandler}, DragulaService]
pages/type/type.ts:
import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
import { DragulaService } from "ng2-dragula/ng2-dragula";
@Component({
selector: 'page-type',
templateUrl: 'type.html'
})
export class TypePage {
constructor( public navCtrl: NavController, public navParams: NavParams, private dragulaService: DragulaService ) {
dragulaService.drop.subscribe((value) => {
console.log('Item moved');
});
}
type.html:
<div [dragula]='"my-bag"' style="width: 100px; height: 100px; background-color: #ccc">
</div>