Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integrating Interact.js with an Angular Project

I need to use the functionality provided by Interact.js, such as draggable, resizable and such, in an Angular project, but i can't find a solid way of importing it in typescript.

I've read about some work-arounds by defining it as a function, but i just want to know if that's the proper way to do it.

like image 747
jimas13 Avatar asked Feb 09 '18 10:02

jimas13


Video Answer


1 Answers

Interactjs team added type definition so you can use with typescript. Use NPM install instead of separate file like

npm install interactjs

Then the regular import should work

import * as interact from 'interactjs';
like image 111
Tasnim Reza Avatar answered Sep 17 '22 17:09

Tasnim Reza