Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 8846c0c

Browse files
committed
docs(formatter): fix "leading" in currency and edits to limit_to
1 parent 11ff9cd commit 8846c0c

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

lib/formatter/currency.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
part of angular.formatter_internal;
22

33
/**
4-
* Formats a number as a currency (for example 1,234.56$).
4+
* Formats a number as a currency (for example $1,234.56).
55
*
66
* When no currency symbol is provided, '$' is used. For more on formatters,
77
* see the [angular:formatter](#angular-formatter) library.
@@ -22,7 +22,8 @@ class Currency implements Function {
2222
*
2323
* - `value`: the value to format as currency.
2424
* - `symbol`: the currency symbol to use. If no symbol is specified, `$` is used.
25-
* - `leading`: places the symbol in front of the number instead of following it.
25+
* - `leading`: when set to false, places the symbol after the number instead of before
26+
* it.
2627
*/
2728
call(value, [symbol = r'$', leading = true]) {
2829
if (value is String) value = double.parse(value);

lib/formatter/limit_to.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ part of angular.formatter_internal;
88
*
99
* Usage:
1010
*
11-
* {{ expression | limitTo:_value_ }}
11+
* {{ expression | limitTo:_number_ }}
1212
*
1313
*
14-
* <div ng-repeat="item in expression | limitTo:_value_">{{item}}</div>
14+
* <div ng-repeat="item in expression | limitTo:_number_">{{item}}</div>
1515
*
1616
*
17-
* Where the input expression is a [List] or [String], and `limitTo` evaluates to:
17+
* Where the input expression is a [List] or [String], and `limitTo` is:
1818
*
19-
* - **a positive integer**: return _value_ items from the beginning of the list or string
19+
* - **a positive integer**: return _number_ items from the beginning of the list or string
2020
* expression.
21-
* - **a negative integer**: return _value_ items from the end of the list or string expression.
22-
* - **null or non-integer**: return an empty list or string.
21+
* - **a negative integer**: return _number_ items from the end of the list or string expression.
2322
* - **`|limitTo|` greater than the size of the expression**: return the entire expression.
23+
* - **null** or all other cases: return an empty list or string.
2424
*
2525
* When operating on a [List], the returned list is always a copy even when all
2626
* the elements are being returned.

0 commit comments

Comments
 (0)