Class: Number filter:ngeoNumber

ngeo.misc.filters.Number

new Number($locale)

A filter used to format a number with a precision, using the locale.

Arguments:

  • opt_precision: The used precision, default is 3.

Examples:

 {{0.1234 | ngeoNumber}} => 0.123
 {{1.234 | ngeoNumber}} => 1.23
 {{12.34 | ngeoNumber}} => 12.3
 {{123.4 | ngeoNumber}} => 123
 {{1234 | ngeoNumber}} => 1230
Parameters:
Name Type Description
$locale angular.$locale

Angular locale

Returns:
ngeox.number

Function used to format number into a string.

Methods

(inner) result(number, [opt_precision]opt)

Parameters:
Name Type Attributes Description
number number

The number to format.

[opt_precision] number= <optional>

The used precision, default is 3.

Returns:
string

The formatted string.