I use angularjs v1.0.7. I have a hidden form field, which it's value is related with other input value. In http://jsfiddle.net/4ANaK/ example, hidden filed not update as I type in text input filed filed.
<div ng-controller="MyCtrl">
<form ng-submit="action()">
name:<input ng-model="name" type="text" value="you name">
<input ng-model="nice_name" type="hidden" value="Mr {{name}}" >
<input type="submit">
</form>
</div>
var app=angular.module('myApp', []);
function MyCtrl($scope) {
$scope.name = "David";
$scope.action = function(){
alert($scope.nice_name);
}
}
How to fixed the problem?