You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-8
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ The input date can be one of the following:
64
64
* null
65
65
* undefined
66
66
67
-
The options are the same as the options for `new Intl.DateTimeFormat()`. For a list of the options, see
67
+
The options are a subset of the options for `new Intl.DateTimeFormat()`. For a list of the options, see
68
68
their [docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options).
69
69
70
70
With the `INTL_DATE_PIPE_DEFAULT_OPTIONS` injection token you can specify default options.
@@ -84,7 +84,7 @@ The input can be one of the following:
84
84
* null
85
85
* undefined
86
86
87
-
The options are the same as the options for `new Intl.NumberFormat()`. For a list of the options, see
87
+
The options are a subset of the options for `new Intl.NumberFormat()`. For a list of the options, see
88
88
their [docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options).
89
89
90
90
With the `INTL_DECIMAL_PIPE_DEFAULT_OPTIONS` injection token you can specify default options.
@@ -104,7 +104,7 @@ The input can be one of the following:
104
104
* null
105
105
* undefined
106
106
107
-
The options are the same as the options for `new Intl.NumberFormat()`. For a list of the options, see
107
+
The options are a subset of the options for `new Intl.NumberFormat()`. For a list of the options, see
108
108
their [docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options).
109
109
110
110
With the `INTL_PERCENT_PIPE_DEFAULT_OPTIONS` injection token you can specify default options.
@@ -127,7 +127,7 @@ The input can be one of the following:
127
127
The currency code parameter is required and must be a valid ISO 4217 currency code. If you want to transform a decimal
128
128
number instead, use the `intlDecimal` pipe.
129
129
130
-
The options are the same as the options for `new Intl.NumberFormat()`. For a list of the options, see
130
+
The options are a subset of the options for `new Intl.NumberFormat()`. For a list of the options, see
131
131
their [docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options).
132
132
133
133
With the `INTL_CURRENCY_PIPE_DEFAULT_OPTIONS` injection token you can specify default options.
@@ -146,7 +146,7 @@ The input can be one of the following:
146
146
* null
147
147
* undefined
148
148
149
-
The options are the same as the options for `new Intl.DisplayNames()`. For a list of the options, see
149
+
The options are a subset of the options for `new Intl.DisplayNames()`. For a list of the options, see
150
150
their [docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames#options).
151
151
152
152
With the `INTL_LANGUAGE_PIPE_DEFAULT_OPTIONS` injection token you can specify default options.
@@ -165,7 +165,7 @@ The input can be one of the following:
165
165
* null
166
166
* undefined
167
167
168
-
The options are the same as the options for `new Intl.DisplayNames()`. For a list of the options, see
168
+
The options are a subset of the options for `new Intl.DisplayNames()`. For a list of the options, see
169
169
their [docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames#options).
170
170
171
171
With the `INTL_COUNTRY_PIPE_DEFAULT_OPTIONS` injection token you can specify default options.
@@ -189,18 +189,36 @@ The unit parameter is required, see
189
189
the [specification](https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-issanctionedsimpleunitidentifier)
190
190
for a full list of possible values. If you want to transform a decimal number instead, use the `intlDecimal` pipe.
191
191
192
-
The options are the same as the options for `new Intl.NumberFormat()`. For a list of the options, see
192
+
The options are a subset of the options for `new Intl.NumberFormat()`. For a list of the options, see
193
193
their [docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options).
194
194
195
195
With the `INTL_UNIT_PIPE_DEFAULT_OPTIONS` injection token you can specify default options.
196
196
197
+
### List pipe
198
+
199
+
Use the list pipe like the following:
200
+
201
+
```
202
+
{{['my', 'items'] | intlList: options}}
203
+
```
204
+
205
+
The input can be one of the following:
206
+
207
+
* Iterable of strings
208
+
* null
209
+
* undefined
210
+
211
+
The options are a subset of the options for `new Intl.ListFormat()`. For a list of the options, see
212
+
their [docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#options).
213
+
214
+
With the `INTL_LIST_PIPE_DEFAULT_OPTIONS` injection token you can specify default options.
215
+
197
216
## Background
198
217
199
218
For more context, see the following [GitHub issue](https://github.com/angular/angular/issues/49143)
200
219
201
220
## Feature Roadmap
202
221
203
222
* Performance: Prepare Intl.* object with default options, only construct new object when necessary
204
-
* List pipe
205
223
* Relative time pipe
206
224
* Migration Schematics for usages of Angular pipes
0 commit comments