-
Notifications
You must be signed in to change notification settings - Fork 187
Working with BigInts
Nevtep edited this page Aug 14, 2014
·
4 revisions
To support Int64 numbers on a ng-model property just add the attribute big-number to an input[text] making sure that no other directive overrides the ng-model value.
Validating that the input is a valid BigNumber comes by default, you can set min and max attribute to have the validated accordingly.
There are some things to take into account when representing a model property as a BigNumber:
- The BigNumber object has various methods for comparison that need to be used instead of normal operands for accuracy.
- When converted to a String BigNumbers add quotes, you can use the numeral directive for a better display.