jeudi 19 janvier 2017

Ember.js round the big decimal number

I need to a help. I am trying to push an ember object in an array and when I push an object then ember convert the big decimal number 999999999999999999.99 to 1000000000000000000. It round the value if digits are greater than 14.

Here is the code

var editableRows = [];
editableRows.pushObject(Ember.Object.create({bigNumber: 999999999999999999.99}));

console.log(editableRows);
Class {bigNumber: 1000000000000000000, __ember1484840094341: null, __ember_meta__: Meta}

Is there is any way to prevent this default behavior of ember ?




Aucun commentaire:

Enregistrer un commentaire