Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Working with BigInts
The big-number Directive
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.