Skip to content
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

Closed
tedjp opened this issue Feb 26, 2014 · 2 comments
Closed

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

tedjp opened this issue Feb 26, 2014 · 2 comments

Comments

@tedjp
Copy link

tedjp commented Feb 26, 2014

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

@davidjnelson
Copy link
Contributor

Thanks for the feature request @tedjp !

@davidjnelson
Copy link
Contributor

This is a duplicate of #4344 - going to close it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants