V
V
Vyacheslav Yashnikov2016-12-13 18:13:01
JavaScript
Vyacheslav Yashnikov, 2016-12-13 18:13:01

Is it possible in angular to output data through pattern?

Hello,
tell me if there is an analogue of .replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g, '$1,') (jquery) in Angular ?
Purpose: display a number in the form of 2,989,298.87 rubles.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Yarkov, 2016-12-14
@VyacheslavY

https://jsfiddle.net/yarkov_aleksei/jxcj2w79/4/

A
Abdulla Mursalov, 2016-12-13
@amaprograma

You can use pipes for this.

C
Coder321, 2016-12-17
@Coder321

To do this, there is a native function toLocaleString

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question