Sander,
I did this on a test, but I thought there was a more elegant way to format
on the view.
Anyway, thank you very much!
Regards
Nilson Uehara
Em terça-feira, 23 de agosto de 2016 10:00:59 UTC-3, Sander Elias escreveu:
>
> Hi Nilson,
>
> In your controller you can do something like this:
>
> $scope.items.forEach(function (item) {
> navigator.globalization.numberToString(item.valor, function (number)
> { item.valorFormatted = number}, function () { console.log('erro de
> formatacao de valor'); }, {type: 'currency'})
> });
>
> then in your view:
> <div class="col">{{item.valorFormatted }}</div>
>
> When you do a calculation, you need to update the formatted version to,
> but that's not a big deal.
>
> Regards
> Sander
>
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.