olado / doT

The fastest + concise javascript template engine for nodejs and browsers. Partials, custom delimiters and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

decimal places

DaumantasUrb opened this issue · comments

any way to format number to decimal places?

found this solution for now:
{{=parseFloat(Math.round(value * 100) / 100).toFixed(2)}}

Correct, there is no syntax for number formatting - expressions can be used.