Ibm mobilefirst IBM Worklight-BusyIndicator文本值不能用变量替换?
我试图用一个变量替换busyindicator构造函数中的文本值,而不是对其进行硬编码。但由于某些原因,应用程序无法理解变量Ibm mobilefirst IBM Worklight-BusyIndicator文本值不能用变量替换?,ibm-mobilefirst,worklight-runtime,Ibm Mobilefirst,Worklight Runtime,我试图用一个变量替换busyindicator构造函数中的文本值,而不是对其进行硬编码。但由于某些原因,应用程序无法理解变量 function wlCommonInit(){ var locale = "Caricamento"; var busyIndicator = new WL.BusyIndicator('content',{text:locale}); busyIndicator.show(); } 需要一个字符串,因此不能放置变量 相反,请使用WL.Cli
function wlCommonInit(){
var locale = "Caricamento";
var busyIndicator = new WL.BusyIndicator('content',{text:locale});
busyIndicator.show();
}
需要一个字符串
,因此不能放置变量
相反,请使用WL.ClientMessages
。例如:
var busy;
function wlCommonInit(){
WL.ClientMessages.loading = "טוען...";
busy = new WL.BusyIndicator();
busy.show();
}
阅读材料:
- 培训模块,幻灯片#8