on 06-05-2017 2:29 PM
Hello Guys
Something tell's me this is an easy one but somehow I just can't get it working.
So I have a JS file in app 1 and would like to call is using app 2.
sap.ui.define([
"sap/ui/base/Object"
], function (Object) {
"use strict";
return Object.extend("ehsLibraryAppId.utilities.LoggedOnUser", {
getLoggedOnUser : function (oEvent) {
return("It works");
}
});
});
I've tried calling it in the Component of app2 like this:
// register EHSLibrary
jQuery.sap.registerModulePath("ehslibrary.utilities", "../zehslibrary/utilities");
jQuery.sap.require("ehslibrary.utilities.LoggedOnUser");
var getUser = new ehslibrary.utilities.LoggedOnUser();
var myuser = getUser.getLoggedOnUser(oEvent);
console.log("myuser");
console.log(myuser);
I'm expecting console to write "It works" . . . . It doesn't work . . . .
Any ideas please?
Thanks
Antonette
first check the network tab to see if it tries to load the requested js.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
10 | |
8 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.