I have a problem adding a number from a text box and placing it in another text box. My situation is this:
I have one text box:
<input type="text" ng-model="num1" />
And regardless of what is entered in this text field, it will be the value of another text field like this:
<input type="text" value="{{ num1 + 1 }}" />
This setting shows successfully, but with errors. When I type 2013 on the first, the second shows 20131 instead of 2014 . I also tried using these filters:
<input type="text" value="{{ num1 + 1 | number}}" />
but unfortunately it does not work. What did I miss?
source share