Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Number type bug/problem?
Message
 
 
À
Tous
Information générale
Forum:
Javascript
Catégorie:
Autre
Titre:
Number type bug/problem?
Divers
Thread ID:
01623604
Message ID:
01623604
Vues:
44
UPDATE. Never mind, found solution.

Hi everybody,

I have a field defined in my ViewModel as int number1

In the page we use the following markup:
 <input type="number" name="number1" id="number1" class="form-control" placeholder="@String.Format(Labels.numberX, "1")"
                       min="-2147483648" max="2147483647"
                       ng-model="currentGuest.number1" />
The problem here is if I delete the number from the control, it becomes a NULL value. Is there a simple way to fix the problem so when user is clearing the field, the number still remains 0? Should I try adding {get set} methods for these numbers in the ViewModel?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Répondre
Fil
Voir

Click here to load this message in the networking platform