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

Docs about how to use ifvisible.js on Angular 2 app? #38

Open
theunreal opened this issue Jun 27, 2016 · 3 comments
Open

Docs about how to use ifvisible.js on Angular 2 app? #38

theunreal opened this issue Jun 27, 2016 · 3 comments

Comments

@theunreal
Copy link

Anyone? Tried to stackoverflow too, but no solution found

http://stackoverflow.com/questions/38030846/using-javascript-library-in-angular-2/38032553?noredirect=1#comment63523559_38032553

@muhammaddadu
Copy link

@theunreal Did you figure this out?

@serkanyersen
Copy link
Owner

I know it's late but I'm working on the V2. which is written in TypeScript. You'll be able to use it by simply importing the library now.

You can help me testing by trying out

npm install ifvisible.js@next

in javascript/webpack it should work with

import { ifvisible } from "ifvisible.js"
// or
const ifvisible = require("ifvisible.js").ifvisible;

in typescript it should work with

import { IfVisible } from "ifvisible.js/src/ifvisible";
const ifvisible = new IfVisible(window, document);

It's still in beta, so it still might change but all help is appreciated.

@Tofandel
Copy link

Tofandel commented Jul 6, 2021

You need to use ifvisible.js@next, the v1 didn't have any exports in it it would just register the lib on the window

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

No branches or pull requests

4 participants