How to format the data just for viewing, but keep the value the way it is?
I have this method that formart the value:
formataNomeGrupo(listaGrupoAnaliseCae: SelectItem[]) : any {
listaGrupoAnaliseCae.forEach((nomeGrupo:SelectItem)=>
{nomeGrupo.label = nomeGrupo.label.toLowerCase().replace(/(?:^|\s)(?!da|de|do|e)\S/g, l
=> l.toUpperCase());
});
return listaGrupoAnaliseCae;
};
I call this method here on html :
[options]="formataNomeGrupo(listaGrupoAnaliseCae)"
For example i have a word, like "DOLAR", and I format this to "Dolar". But i want to keep the value "DOLAR" on my typescript.