有两个页面 ,一个index.html 一个 side.html
在index.html有javascript

app.js
var app =(function(){
return {
getView:function(name){
return indexView == name ?
plus.webview.getLaunchWebview() :
plus.webview.getWebviewById(name);
}
}
}());
const indexView = "indexView";
const sideView = "sideView";
side.js
app.toggleSide = function(){
var wc = app.getView(sideView);
var ws = app.getView(indexView);
if (wc.isVisible()) {
ws.setStyle({mask:"none"});
wc.hide("slide-out-left");
} else {
ws.setStyle({mask:"rgba(0,0,0, 0.5)"});
wc.show("slide-in-left");
}
}
app.sideInit = function(){
}
然后在side.html里面
在手机里调试就出错了
index.html里面没有报任何错误
side.html里面 app为什么 is not defined?
明明以经在前面引入了?