Getting external JS libs to work on Ionic

I am working on a social network app and I am currently trying to insert nude.js JavaScript lib into one of my pages to scan the image the user is going to upload to check if it contains nudity. The problem is, I am not sure how to reference a JS script into the typescript class of a ionic page, and trying to get img tag element (needed to pass as parameter at nude.load() method to be scanned) at html page using @ViewChild always returns me null or undefined.

Help!

probably should make a new component for nude.js

1 Like

you should try this https://stackoverflow.com/questions/43833895/how-to-include-js-file-in-ionic-3
solution hop so it helps you

1 Like