Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I import sticksy lib in Angular aplication #11

Open
cichy380 opened this issue Nov 2, 2021 · 1 comment
Open

How can I import sticksy lib in Angular aplication #11

cichy380 opened this issue Nov 2, 2021 · 1 comment

Comments

@cichy380
Copy link

cichy380 commented Nov 2, 2021

Hi,

sticksy lib in not exported as ES6 module, so how can I use it in eg. Angular app?
For example

import Sticksy from 'sticksy';

in component ts file does not work (sticksy is not ES6 module)

@monkeymonk
Copy link

As we can see in source code, you have to use window.Sticksy.

So you can do

import 'sticksy';

// then...
new window.Sticksy('.js-element');

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

No branches or pull requests

2 participants