title: Returned array of objects values comma-seperated in html input field
body: <p>I want to display comma separated values in input field html. 
  Result: <code>First Value, Second Value, Third Value</code>. 
  Values are returned in isolated scope of directive (custom-directive-button) as <code>selectedItems</code>. </p>
  
  <p>Input part in html:</p>
  
  <pre><code>&lt;div class="row"&gt;
    &lt;div class="input-group"&gt;
      &lt;input type="text" class="form-control" ng-model="selected" /&gt;
      &lt;span class="input-group-btn"&gt;
        &lt;button class="btn btn-default" selected-items = "appModel.selectedItems" custom-directive-button&gt;!&lt;/button&gt;
      &lt;/span&gt;
    &lt;/div&gt;
    &lt;ul&gt;
      &lt;li ng-repeat="item in appModel.selectedItems"&gt;{{ item.attrValue }}&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Returned object "selectedItems" looks like this:</p>
  
  <pre><code>[{"attrValue": "First Value","descText": "First Value in array"},{"attrValue": "Second Value","descText": "Second Value in array"},{"attrValue": "Third Value","descText": "Third Value in array"}]
  </code></pre>
  
  <p>Is it possible to achieve it somehow with Angular JS (filter) or with JQuery. </p>
  
  <p>Other requirement is to have this functionality both way.
  So if user will type something into the input field, it will automatically update as well <code>selectedItems</code> with typed <code>attrValue, and &lt;NA&gt; as description</code>.</p>
  
  <p>Thanks.</p>