1

How I can show only one decimal in the p tag. if I want to use pipe, how I can use it ?

<p> {{total.one / total.two *100}} </p>
2

1 Answer 1

1

maybe this code will help you

{{total.one | number : '1.2-2'}}

{{(total.one / total.two *100)|number : '1.2-2'}}

{{(total.one / total.two *100)|number : '1.1-1'}}

2-2 is value of decimal points

so 1-1 shows you one decimal point this code show you 2 decimal pointe

0