title: String Concatenation in Angular
body: <p>Simple question, but struggling to find an answer.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div class="col-sm-5"&gt;
  &lt;input type="text" class="form-control" placeholder="key" 
  ng-model="main.key" ng-change="updateJson()"&gt;
  &lt;/div&gt;
  &lt;div class="col-sm-7"&gt;
  &lt;input type="text" class="form-control"  placeholder="value" 
  ng-model="main.value" &gt;
  </code></pre>
  
  <p><strong>JS</strong></p>
  
  <pre><code>$scope.updateJson=function(){
    this.jsonObject +=this.key+":"+this.value;
  };
  </code></pre>
  
  <p>I have a text field which is bound to UpdateJson, it outputs this as I type in the text boxes.</p>
  
  <pre><code>undefinedundefined:undefinedundefined:undefinedundefined:undefined
  </code></pre>
  
  <p>How do I concatenate a String in a way that it recognizes the type correctly? </p>