I am new to angular 2 and I would like to understand how I should install the paperjs library in my angular2 client. Should I just type npm install paper? This doesn't seem to include paperjs in my app. Should I just include it using the <script>
tag? Please help me understand how I should approach this problem.
Asked
Active
Viewed 578 times
0

Mark
- 8,408
- 15
- 57
- 81
-
Check: http://stackoverflow.com/questions/30623825/how-to-use-jquery-with-angular2 – eko Dec 30 '16 at 05:46
-
Possible duplicate of [How to install and import paperjs for Angular 2?](https://stackoverflow.com/questions/41388881/how-to-install-and-import-paperjs-for-angular-2) – Amr Ibrahim Aug 11 '17 at 06:40
1 Answers
0
this question was answered before here I did the following to get it working:
npm install paper --save
npm install @types/paper --save
In systemjs.comfig.js add a map for paper
map:
...
'paper': 'npm:paper/dist/paper-core.js'
},
In the component
import { PaperScope, Path, Point } from 'paper';
Note for Ionic2 users: You can skip the systemjs.config.js part.

Amr Ibrahim
- 2,066
- 2
- 23
- 47