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