This repository was archived by the owner on Feb 22, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +9
-12
lines changed Expand file tree Collapse file tree 5 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ part of angular.formatter_internal;
3
3
/**
4
4
* Transforms a Map into an array so that the map can be used with `ng-repeat` .
5
5
*
6
- * Example:
6
+ * # Example
7
7
*
8
8
* <div ng-repeat="item in {'key1': 'value1', 'key2':'value2'} | arrayify">
9
9
* {{item.key}}: {{item.value}}
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ typedef bool _Equals(a, b);
10
10
*
11
11
* # Usage
12
12
*
13
- * filter: expression[:comparator]
13
+ * filter:expression[:comparator]
14
14
*
15
15
* In addition to the expression, which is used to select a subset from the list,
16
16
* you can also specify a comparator to specify how the operation is performed.
Original file line number Diff line number Diff line change 4
4
*
5
5
* A formatter is a pure function that performs a transformation on input data from an expression.
6
6
* You can extend Angular by writing your own formatters and providing them as part of a custom
7
- * library. See the @[Formatter] (#angular-core-annotation .Formatter) class annotation for more
7
+ * library. See the @[Formatter] (#angular-core-annotation.Formatter) class annotation for more
8
8
* detail.
9
9
*
10
10
* Formatters are typically used within `{{ }}` to
Original file line number Diff line number Diff line change @@ -3,8 +3,9 @@ part of angular.formatter_internal;
3
3
/**
4
4
* Formats a number as text.
5
5
*
6
- * If the input is not a number, an empty string is returned.
7
- *
6
+ * If the input is not a number, an empty string is returned. When `fractionSize` is not
7
+ * provided, fraction size is computed from the current locale's number
8
+ * formatting pattern. In the case of the default locale, it will be 3.
8
9
*
9
10
* # Usage
10
11
*
@@ -21,10 +22,6 @@ class Number {
21
22
*
22
23
* - `value` : the value to format
23
24
* - `fractionSize` : Number of decimal places to round the number to.
24
- *
25
- * When `fractionSize` is not provided, fraction size is computed from the current locale's number
26
- * formatting pattern. In the case of the default locale, it will be 3.
27
- *
28
25
*/
29
26
call (value, [fractionSize = null ]) {
30
27
if (value is String ) value = double .parse (value);
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ typedef dynamic _Mapper(dynamic e);
31
31
*
32
32
* # Examples
33
33
*
34
- * Example 1: Simple array and single/empty expression.
34
+ * ## Example 1: Simple array and single/empty expression.
35
35
*
36
36
* Assume that you have an array on scope called `colors` and that it has a list
37
37
* of these strings – `['red', 'blue', 'green']` . You might sort these in
@@ -68,7 +68,7 @@ typedef dynamic _Mapper(dynamic e);
68
68
* <li ng-repeat="color in colors | orderBy:'':true">{{color}}</li>
69
69
* </ul>
70
70
*
71
- * Example 2: Complex objects, single expression.
71
+ * ## Example 2: Complex objects, single expression.
72
72
*
73
73
* You may provide a more complex expression to sort non-primitive values or
74
74
* if you want to sort on a decorated/transformed value.
@@ -111,7 +111,7 @@ typedef dynamic _Mapper(dynamic e);
111
111
* for each element in the list (i.e. each author object) and the sort order is
112
112
* determined by the sort order of the value mapped by the callable.
113
113
*
114
- * Example 3: List expressions
114
+ * ## Example 3: List expressions
115
115
*
116
116
* Both a string expression and the callable expression are simple versions of
117
117
* the more general list expression. You may pass a list as the orderBy
You can’t perform that action at this time.
0 commit comments