1

how can I install the draw2d touch library on Angular 2 ? I do not find any news about it.

Thank you

Aravind
  • 40,391
  • 16
  • 91
  • 110
uroti
  • 147
  • 1
  • 11

3 Answers3

1

You can put the library's files in the scripts section of your angular-cli.json. In your component you can write:

declare var draw2d:any;
dstyle
  • 68
  • 9
0

I used the npm package listed here: https://www.npmjs.com/package/draw2d-wrapper

My project was an Angular4 project built from using angular cli. I added the require statement in the lib.ts file as shown in the readme. Then within the xxx.component.ts file I again followed the readme and added this statement:

let draw2d = (<any>window).draw2d;

This allowed me access to the draw2d library.

0

You can install using either npm or bower.