Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ngList always joins array with ", ", not with user-defined separator #6466

@tedjp

Description

@tedjp

The ngList directive always joins existing data with comma-space (,), regardless of the separator specified by the developer - even if it's not a regex.

It would be great if the array could be joined using the same separator as is used for tokenizing (String.prototype.split()).

If it's a regex, it would be nice to be able to provide a separator (perhaps after the final / in the regex?) to be used when joining existing data. This would be useful when splitting on a newline (ng-list="/\n/"), or when both comma and semi-colon are allowed as separators (ng-list="/[,;]/").

Plunker demonstrating that existing data is always joined with comma-space: http://plnkr.co/edit/iScyKmEWeV0IFUyuM9rr?p=preview

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions