You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Importing Js library for custom code

edited Dec 31, 2018 6:33AM in Visual Builder 6 comments

Content

I have a mobile application. I have page in which I have menu items. For one of the menu item selection,I used "Call Module Function" in my action chain. I was able to choose the function that I have wrote in my page js section .The js is like below
 

define(["mobileApps/MyExpenseMobile/flows/main/resources/jsQR"], function(jsqr) {
  'use strict';
  
  var PageModule = function PageModule() {  
       PageModule.prototype.scanIt = function() {
        console.log("dummy");
        return "dummy";
    };  };

  return PageModule;
});

When I run it, I see the console error saying 
[VB 6:56:53 PM (ERROR), /vb/action/action/CallModuleAction]: i (callModuleFunction1_adpqjfk36) The module does not exist or the function 'scanIt' does not exist in the module.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!