question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Negative numbers on thousand separator is not worrkring

See original GitHub issue

Hi, I have an issue with the thousand separator mask and negative numbers.

Have this function in my component

getIncome() {
  const testValue = 5 - 1000;
  return testValue; 
  // testValue output is -995
}

Have this expression in my template

<div>
{{ getIncome() | mask: 'dot_separator' }} 
   // expression outputs -99
   // should output  -995
</div>

The output is cutting off the last number from a negative number. I looked through the documentation and issues and I can’t find any issues or fixes related to this. H

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
ValeriaKochegarovacommented, Mar 27, 2019

@cnthiesen you should write like this
< div mask="dot_separator" > {{ getIncome()}} </div>

5reactions
sollennecommented, Jul 11, 2019

Again they close this issue without a resolution. good job.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ActionScript3 - add thousands separator to negative values
However, the dataset I am currently mapping has large negative values, and it tutrns out that the ORIGINAL HELPER FUNCTION below does not...
Read more >
Show or hide the thousands separator - Microsoft Support
To display or hide the thousands separator, select or clear the Use 1000 Separator (,) check box. Tip: To quickly display the thousands...
Read more >
Format Thousand Separator (Positive and Negative values)
Hi, I am currently have problem on formatting my stata variable similar to excel thousand separator, my dta look like:
Read more >
Show Negative Numbers in Parentheses (Brackets) in Excel ...
There is a possibility that you may not see the same 'Negative numbers' formatting ... Showing the numbers with thousand separators, and negative...
Read more >
Excel Formatting - Number - BetterSolutions.com
Use 1000 separator - The 1000 separator will insert a comma every 3 digits, i.e. hundred, thousand etc. Negative Numbers - The default...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found