I'm trying to use the cordova.plugin-globalization
plugin but I'm running into my little Javascript experience.
xhtml:
<div>{{ item.valor | formataValor }}</div>
filter.js:
app.filter('formataValor',function(){
return function(valor){
console.log('globalization: '+valor)
navigator.globalization.numberToString(
valor,
function (number) {
console.log('numero formatado:' + number.value);
return number.value;
},
function () {
console.log('erro de formatacao de valor');
},
{type: 'currency'}
);
}
});
Apparently the return of the navigator.globalization.numberToString
function is missing, since the console output is ok.