Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Negative Balance in Red
Message
Information générale
Forum:
Javascript
Catégorie:
Autre
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01608940
Message ID:
01608982
Vues:
49
This message has been marked as the solution to the initial question of the thread.
>
>I'd like to show balance in red when negative.
>

>
>I'll check with project manager first.

The thread you linked to includes part of the answer - if you don't want parens, create your own filter. Yeah, it'd be nice if this was easier to configure.

For setting it to red, look at ng-class. Create a CSS style with the colors you want. I'd wrap the {{}} stuff in something like a span tag. Add the ng-class attribute to the span and use an expression to set the class to your CSS class, something like this might work (remove the extra space I needed to add to the span tags to get this to appear here):
< span ng-class="{'negative' : currentAccount.totalBalance < 0}">{{currentAccount.totalBalance}}< /span>
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform