Pergunta

I am trying to substitute the text value in the constructor of the busyindicator with a variable rather hardcoding it. But for some reason the app is not able to understand the variable...

function wlCommonInit(){
    var locale = "Caricamento";
    var busyIndicator = new WL.BusyIndicator('content',{text:locale}); 
    busyIndicator.show();
}
Foi útil?

Solução

WL.BusyIndicator's text option expect a string, so you may not place a variable.

Instead, use WL.ClientMessages. For example:

var busy;

function wlCommonInit(){
    WL.ClientMessages.loading = "טוען...";
    busy = new WL.BusyIndicator();
    busy.show();
}


Reading material:

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top