sapui5 - Formatter include third party moment.js -


i have problem use third party library moment.js in our formatter.

formatter.js working way:

sap.ui.define([], function() {     "use strict";     return {         moment: jquery.sap.require("name.de.tbase1.model.moment"), 

this don't:

sap.ui.define([     "name/de/tbase1/model/moment" ], function(moment) {     "use strict";     return {         moment: moment 

if use second option, lib loaded fine, error: sinon.js:175 uncaught typeerror: fake xhr onreadystatechange handler threw exception: moment not function

any ideas?

this solved problem.

sap.ui.define([     "name/de/tbase1/model/moment" ], function(moment) {     "use strict";     return {         moment: moment, 

Comments

Popular posts from this blog

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -