Skip to content
This repository has been archived by the owner on Mar 27, 2019. It is now read-only.

How to use iScroll in Angular / TypeScript project? #1257

Open
pjc2007 opened this issue Jan 2, 2019 · 0 comments
Open

How to use iScroll in Angular / TypeScript project? #1257

pjc2007 opened this issue Jan 2, 2019 · 0 comments

Comments

@pjc2007
Copy link

pjc2007 commented 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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant