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

c++ - CPP, 'X' button listener -

shared memory - gstreamer shmsrc and shmsink with h264 data -

.net - Bulk insert via Dapper is slower than inserting rows one-by-one -