简体   繁体   English

WL.JSONStore是IBM mobilefirst中的未定义错误

[英]WL.JSONStore is undefined error in IBM mobilefirst

I am getting WL.JSONStore is undefined error in mobile browser simulator while I am trying to use JSONStore in my mobile application.I am using IBM mobilefirst (version 8.0.0-2017091111). 我正在尝试在移动应用程序中使用JSONStore时,在移动浏览器模拟器中得到WL.JSONStore是未定义的错误。我正在使用IBM mobilefirst(版本8.0.0-2017091111)。 在此处输入图片说明

function wlCommonInit(){

WL.JSONStore.init(collections, options).then(function () {
     alert("intialized successfully");

    }).fail(function (errorObject) {
        alert("failed to initialize collection\n"+ JSON.stringify(errorObject));
    });   

document.getElementById("btn_submit").addEventListener("click", onSubmit, false);

}

function onSubmit(){
var collectionName="people";
var data={firstName:$('#first').val(),middleName:$('#middle').val(),lastName:$('#last').val()};
WL.JSONStore.get(collectionName).add(data, options).then(function () {
   alert("added data successfully");
}).fail(function (error) {

});
}

Could you specify which version of 'cordova-plugin-mfp-jsonstore' your app is using (run command 'cordova plugin ls'). 您能否指定您的应用程序正在使用哪个版本的“ cordova-plugin-mfp-jsonstore”(运行命令“ cordova plugin ls”)。

Did you follow this tutorial Link 您是否遵循了本教程的链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM