Implementing custom JS into Website based App

Hi, I have a e-com website restricted to a very specific audience. I have been trying to create the app based version using Ionic but I am having some trouble in using the Generator code which is made up of JavaScript code.

It is not working on the app version when testing.

This is not even nearly enough information…

1 Like

Hi, thanks for reaching out. What should I provide more?

This is the JavaScript code of the generator that I think has been messing with the app code -

p.s. the code is executing perfectly on the on my eShop codes website.

function makeId(length) {
  var text = "";
  var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  for (var i = 0; i < length; i++)
    text += possible.charAt(Math.floor(Math.random() * possible.length));
  return text
}

Just ran it fine.

How are you making use of it within your code?
Do you have an example repo with this?

1 Like

Hi, the code the working fine with me too but on the website. When I’m trying to add it in a button on the app, then it is only crashing.

You will need to provide a lot more example.

Share an example repo and I’m happy to take a look.