Athinodoros Sgouromallis Athinodoros Sgouromallis - 4 months ago 43
TypeScript Question

Ionic 2 using third party js libs

Hi I am tring to use DrumJs in an ionic 2 project and this library requires to run $("select").drum() when the document is ready but even though i have it in a $(document).ready(function().....) it runs before the document :/ Any ideas where to add this in order to run properly?

p.s. I can not import it in my .ts file so i'm using gulp to concatinate some js files that I import via the index.html


Try to run your code using one of the lifecycle events, i.e.:

ionViewLoaded() {

Here is the documentation: