These are chat archives for angular-ui/ui-select

9th
Jun 2015
Mark D Johnson
@thefewminutes
Jun 09 2015 15:52
I need to change the output of the selected model from
Selected: ["kristy.ahlgren@aaatruss.com.au","info@aaacleaningmaintenance.com.au"]
to
Selected: [kristy.ahlgren@aaatruss.com.au;info@aaacleaningmaintenance.com.au]
what would be the best way to go about this?
Ben Orozco
@benoror
Jun 09 2015 15:59
@thefewminutes a JSBin example would be nice if you're seeking for help
Mark D Johnson
@thefewminutes
Jun 09 2015 16:03
in your multi-selection demo
http://plnkr.co/edit/juqoNOt1z1Gb349XabQ2?p=preview
under "array of objects with a single property binding"
you have:
Selected: ["samantha@email.com","wladimir@email.com"]
what would be the best way to achieve
Selected: [samantha@email.com;wladimir@email.com]
Ben Orozco
@benoror
Jun 09 2015 16:10
one sec
Mark D Johnson
@thefewminutes
Jun 09 2015 16:11
the reason I'm asking is because this is for sending email to multiple recipients, but the API only accepts the format
samantha@email.com;wladimir@email.com;mark@email.com etc
any help is much appreciated thank you
Ben Orozco
@benoror
Jun 09 2015 16:11
oh got it
well you might concatenate the emails before sending them to your backend/email-server/whatever
something like:
Ben Orozco
@benoror
Jun 09 2015 16:17
var myArrayOfEmails = ["samantha@email.com","wladimir@email.com"]
var myRecipients = "";

myArrayOfEmails.forEach(function (element, index, array) {
  myRecipients = myRecipients + element;
  if(index < array.length - 1) {
    myRecipients = myRecipients + ';';
  }
});
Mark D Johnson
@thefewminutes
Jun 09 2015 16:21
ok perfect I didn't know if there was a change I could make in select.js or if I should use this method. thanks!
Ben Orozco
@benoror
Jun 09 2015 16:53
mmm, it has nothing to do with ui-select