I have a function like so:
In another JS script I would like to get the "blah" variable value. I would think it would just be doing something along the lines of this:
But that does not seem to work. What am I missing here?
JavaScript:
var UploadMediaViewModel = (function () {
const umvm = this;
var blah = "";
umvm.upload = null;
umvm.toProcess = [];
umvm.unload = function(e) {
cancel();
}
umvm.canSubmit = false;
umvm.submitWhenComplete = false;
function cancel() {
...
}
function init() {
...
}
const openFileDialog = (e) => {
...
}
function onError(e) {
...
}
const onProgress = (e) => {
...
}
const onUploadComplete = (e) => {
...
}
function onSuccess(e) {
...
}
function submit() {
...
}
function upload(e) {
umvm.canSubmit = false;
umvm.uploading = true;
.....
}
init();
return {
onUploadSuccess: onSuccess,
onUploadError: onError,
onSubmit: submit,
onUpload: upload,
onCancel: cancel,
onUploadComplete,
onProgress,
openFileDialog
}
})();
In another JS script I would like to get the "blah" variable value. I would think it would just be doing something along the lines of this:
JavaScript:
UploadMediaViewModel.blah;
But that does not seem to work. What am I missing here?