Integrating Javascript Web chat plugin


Im trying to integrate Applozic chat platform to my Ionic 2 Project which I wish to export to Web, Android and iOS. Using the sample as a base and created the applozic.js & applozic.d.ts for the Javascript integration process.

I added all the above created files including applozic.common.js, applozic.fullview.js and jquery.min.js to the assets/js folder and linked them in my index.html. This was the only way I could get the Javascript method in applozic.js to execute from my chat.ts.

The problem that i’m now facing is the I get the error TypeError: Cannot read property 'noConflict' of undefined in applozic.js on the line $original = jQuery.noConflict(true); and consequently the rest of the if block is also not executing.

In an attempt to make jQuery work in the project I tried to install it via npm by executing the following commands:

npm install jquery --save
npm install @types/jquery --save

But this led to issue in ionic serve giving the following error JavaScript heap out of memory

I really need help in executing my applozic.js file to initialize and call the chat plugin functions.