How to use iScroll in Angular / TypeScript project?
Author: pjc2007Created Jan 2, 2019Updated Jan 2, 2019
I have tried everything to try and use iScroll via TypeScript. I have install the following
npm i iscroll --save
npm i @types/iscroll --save
I then imported as follows..
import { IScroll } from 'iscroll';
and then use as per the docs...
var wrapper = document.getElementById('wrapper');
var myScroll = new IScroll(wrapper);The first error it to do with the typedef not being a module, so I added..
declare module 'Iscroll';
and exported the interface and class.
It now builds but when I try to new up IScroll it is not defined.
Is there any doco on how to use this in this environment?
Source: cubiq/iscroll