Tuesday, 19 April 2016

number filter in angular:

If the input is null or undefined, it will just be returned. If the input is infinite (Infinity or -Infinity), the Infinity symbol '∞' or '-∞' is returned, respectively. If the input is not a number an empty string is returned.

syntax: {{ number_expression | number : fractionSize}}

Ex:

Task1 : 

{{ 12345.625252 | number }}

output: 12345.625

Task2 :

{{ 12345.625252 | number:2 }}

output: 12345.62

Task3:
{{ 12345.625252 | number:0 }}
output: 12346

No comments:

Post a Comment