-
-
Notifications
You must be signed in to change notification settings - Fork 185
Open
Description
(I'm sorry for my English)
I am trying to use ifVisible in angular 7 but I can't use it, can someone help me please?
What am I missing or what do I fail?
install it with npm and ifvisible,
in my package.json
"ifvisible": "1.1.0",
in my angular.json
"scripts": [
"./node_modules/ifvisible/src/ifvisible.js"
],
my .ts
import {IfVisible} from "ifvisible / src / ifvisible.js";
const ifvisible = new IfVisible (window, document);
using it in a function:
ifvisible.setIdleDuration (300);
console.log (ifvisible);
I get this error:
TypeError: ifvisible_src_ifvisible_js__WEBPACK_IMPORTED_MODULE_6 __. IfVisible is not a constructor
TypeError: ifvisible_src_ifvisible_js__WEBPACK_IMPORTED_MODULE_6 __. IfVisible is not a constructor
Metadata
Metadata
Assignees
Labels
No labels