Skip to content

API Reference


API Reference / @dasch-ng/utils / intl/src / IntlListPipe

Class: IntlListPipe ​

Defined in: libs/ng/utils/intl/src/lib/intl-list.pipe.ts:15

Joins strings as a localized list with Intl.ListFormat: a, b, and c or a, b oder c.

Example ​

html
{{ ['Alice', 'Bob', 'Carol'] | intlList }}                          <!-- Alice, Bob, and Carol -->
{{ formats | intlList: { type: 'disjunction' } : 'de-DE' }}         <!-- MP4, MOV oder MXF -->
{{ ['3 h', '5 min'] | intlList: { type: 'unit', style: 'narrow' } }} <!-- 3 h 5 min -->

Extends ​

  • IntlPipeBase

Implements ​

  • PipeTransform

Constructors ​

Constructor ​

new IntlListPipe(): IntlListPipe

Returns ​

IntlListPipe

Inherited from ​

IntlPipeBase.constructor

Methods ​

locale() ​

protected locale(locale?): string

Defined in: libs/ng/utils/intl/src/lib/formatter-cache.ts:29

Parameters ​

locale? ​

string

Returns ​

string

Inherited from ​

IntlPipeBase.locale


transform() ​

transform(values, options?, locale?): string

Defined in: libs/ng/utils/intl/src/lib/intl-list.pipe.ts:16

Parameters ​

values ​

Iterable<string, any, any> | null | undefined

options? ​

ListFormatOptions

locale? ​

string

Returns ​

string

Implementation of ​

PipeTransform.transform

Released under the MIT License.