Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why I still see by and at
Message
Information générale
Forum:
Javascript
Catégorie:
Autre
Divers
Thread ID:
01608885
Message ID:
01608900
Vues:
72
This message has been marked as a message which has helped to the initial question of the thread.
Eeeek...

You should make your life easier and use ng-show/ng-hide expressions with [span] elements to display/hide content like this. Much easier to deal with than these long expressions...

And... aren't those expressions C# expressions? Angular can only render values from you model and some limited JavaScript. Pretty sure String.IsNullOrWhiteSpace() and TrimEnd() don't exist in JavaScript and even if it did Angular wouldn't understand it because it's limited to a very small subset of JavaScript.

+++ Rick ---

>Hi everybody,
>
>I added the info message at the bottom of my form:
>
>
>{{currentAccount.dateTime==null?"":"Account Created: "}}{{currentAccount.dateTime | date:'medium'}} {{String.IsNullOrWhiteSpace(currentAccount.operator)?"":"by"}} {{currentAccount.operator.TrimEnd()}} {{String.IsNullOrWhiteSpace(currentAccount.salespoint)?"": "at"}} {{currentAccount.salespoint.TrimEnd()}}</label>
>
>I don't understand why do I still see 'by' and 'at' but no operator and no salespoint?
>
>Do you see what is wrong with my expression?
>
>Thanks in advance.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform