Angular Bind Model to Model

I had a scenario, i have to show 4 inputs. In which 4th input is the sum of other 3. this should be easy, but the challenging factor is that i have to save the last input value in a model. So the scenario changed to “Give value for a model from another three model” and the change should be dynamic. Here is the solution i found for that. 🙂 DEMO

<input type="text" ng-model="textInput1" id="textBoxval1" value="temp2"/>
<input type="text" ng-model="textInput2" id="textBoxval2" value="temp2"/>
<input type="text" ng-model="textInput3" id="textBoxval3" value="temp2"/>
<input type="text" ng-model="textInputT" id="textBoxvalT" 
value = "{{textInputT=textInput1 +'-'+ textInput2 +'-'+ textInput3}}"/>