Using the Android Kapsel mobile app as an example, use the SAPUI5 class library
Example 1:
Plugins\kapsel-plugin-logon\www\common\assets\ui\logonform.js
In the file to use
1) www\mobile\ directory view XML, view JS, Controller JS resource file
2) www\mymodules\ The following JS resource file
Sap. LogonForm = function () {
JQuery.sap.registerModulePath ("mobile", ' ... /.. /.. /mobile/');
JQuery.sap.registerModulePath ("Mymodules", ' ... /.. /.. /mymodules/');
Example 2:
Www\
The JS resource file in the file to use the Www\mymodules\ directory
<meta http-equiv= "Content-type" content= "Text/html;charset=utf-8"/> <script
src= "./resources/ Sap-ui-core.js "
id=" Sap-ui-bootstrap "data-sap-ui-libs=" Sap.m,sap.ui.core "Data-sap-ui-theme=" Sap_ Bluecrystal "> </script>
<script type=" Text/javascript "charset=" Utf-8 "src=" Cordova.js "></ script>
<script>
jQuery.sap.registerModulePath ("Mymodules", './mymodules/');
Reference:
Registering Component Resources