0

In SQlServer I have these values stored in the ID -6410551811284209102 2248193693505952772 1897495303850505563

But while fetching it truncate the value in AngularJS, Like for 1897495303850505563 it convert as 1897495303850505500 for 2248193693505952772 it convert as 2248193693505952800. This is because I am storing these values in either number or object. But these are BigInt in SqlServer. Anybody has any clue for how to store these values in bigInt.

  • duplicate of: https://stackoverflow.com/questions/4557509/javascript-summing-large-integers – Jester Sep 15 '17 at 06:37
  • Possible duplicate of [Javascript summing large integers](https://stackoverflow.com/questions/4557509/javascript-summing-large-integers) – Jester Sep 15 '17 at 06:37

2 Answers2

0

Maybe you can use this javascript library for AngularJS https://www.npmjs.com/package/big-integer

nikli
  • 2,281
  • 2
  • 24
  • 38
  • But how can we use it in HTML page. I get all the data using AngularJs Get Call, and then binding it in the HTML controls. So If I am using like this: bigInt(item.USER_ID), it surly throw me the error. – Sumit Joshi Sep 15 '17 at 08:07
0

Can you convert/cast the big int to a string?

user1952312
  • 258
  • 1
  • 4
  • 13