Assuming I want to use the following library in my angular 2 app: https://github.com/serkanyersen/ifvisible.js
What I need to do?
I tried to update my SystemJS config with:
var map = {
`'ifvisible.js': 'node_modules/ifvisible.js'`
}
var packages = {
'ifvisible.js': {defaultExtension: 'js', main:'src/ifvisible.min' }
};
Also added this to my index.html:
<script src="node_modules/ifvisible.js/src/ifvisible.min.js"></script>
and in my component:
import * as ifvisible from 'ifvisible.js';
I get error TS2307: Cannot find module 'ifvisible.js'.
What's wrong?