[ADF-4219] Multivalue Metadata Card View (#4600)

* [ADF-4219] Multivalue Metadata  Card View

* [ADF-4219] Add documentation

* [ADF-4219] Improve code, docs and tests

* [ADF-4219] Fix e2e tests
This commit is contained in:
davidcanonieto
2019-04-17 17:04:27 +01:00
committed by Eugenio Romano
parent 21fd0299bd
commit 8395b0baa5
18 changed files with 217 additions and 24 deletions

View File

@@ -0,0 +1,39 @@
# [Multi Value Pipe](../../../lib/core/pipes/multi-value.pipe.ts "Defined in multi-value.pipe.ts")
Takes an array of strings and turns it into one string where items are separated by a separator. The default separator applied to the list is `', '`, however, you can set your own separator in the params of the pipe.
## Basic Usage
<!-- {% raw %} -->
### Default separator
```HTML
<div>
List {{ values | multiValue }}
</div>
```
#### Result
![multi-value-pipe](../../docassets/images/multi-value-default.pipe.png)
### Custom separator
```HTML
<div>
List {{ values | multiValue: ' :) ' }}
</div>
```
<!-- {% endraw %} -->
#### Result
![multi-value-pipe](../../docassets/images/multi-value.pipe.png)
## Details
The pipe gets every one of the items passed to the pipe and stringifies it adding the separator set in the configuration.
You will need to specify the separator you want to use for it to work.