Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Number type bug/problem?
Message
 
 
To
All
General information
Forum:
Javascript
Category:
Other
Title:
Number type bug/problem?
Miscellaneous
Thread ID:
01623604
Message ID:
01623604
Views:
43
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
Reply
Map
View

Click here to load this message in the networking platform