title: How to bind two field values to a single text box
body: <p>I am working on angularJS and Html, </p>
  
  <p>from my angularJs side I am getting two fields they are</p>
  
  <pre><code>name.firstname, name.lastname,
  </code></pre>
  
  <p>So in my html i will be able to display it like this</p>
  
  <pre><code>&lt;div&gt;{{name.firstname}}-{{ name.lastname}}&lt;/div&gt;
  </code></pre>
  
  <p>but i want to display these two values in a single text box separated by ","</p>
  
  <p>I tried as given below but it is not working</p>
  
  <pre><code>&lt;div&gt;&lt;input type ='text' ng-model ="name.firstname" , "name.firstname"/&gt;&lt;/div&gt;
  </code></pre>
  
  <p>please suggest me how to do this in a simple way without using any directives</p>