I've followed the instructions here: https://github.com/valor-software/ng2-dragula/wiki#5-min-quickstart as well as here: https://www.npmjs.com/package/ng2-dragula
Angular-quickstart is working, as per:
git clone https://github.com/angular/quickstart angular2-dragula-test
npm install
npm start
"My First Angular App" (pops up in in the browser - so everything is working)
I install dragula by:
npm install ng2-dragula dragula --save
I replaced the quickstart files with the exact content of the valor-software ng2-dragula wiki (first link).
If someone could provide any advice (about unlisted steps that are critical) or a simple sanity check it would be much appreciated.
To resolve
"zone.js:1274 GET localhost:3000/ng2-dragula/ng2-dragula 404 (Not Found)"
error, add below block in yoursystemjs.config.js
These are the full instructions for using angular-quickstart to set up a ng2-dragula basic test app (see bottom section "UPDATE using Angular-CLI" if using Angular-CLI):
Set up a new angular-quickstart project:
If all is well you should have a web page stating "My First Angular 2 App", the basic angular2-quickstart is working, we'll now add dragula.
In index.html we'll add the dragula.css by adding the following line:
This is my full index.html for reference:
systemjs.config.js (look for the two comments reading "//***the following is required by dragula********************" if you just want to add the relevant lines ):
Import the DragulaModule in app.module.ts:
Replace app.component.ts with the following:
Update using Angular-CLI
Fortunately the instructions are easier than what is required above:
First set up a new project, and add Dragula:
If you get an error such as the following:
Then you need to upgrade angular-cli, probably a good idea to upgrade npm too:
Add the following line to your index.html:
Import the DragulaModule in in app.module.ts (see the two comments "//NEW"):
Import the DragulaService in app.component.ts (see the two comments "//NEW"):
Update the html (app.component.html) so there is a working example:
Now there is a working example, this optional block of CSS will make the example look nicer (app.component.css):
Now you should have a working example.