I really like how the ng-model attribute binds directly to my model and users get instant feedback on their changes. For my use case that\'s perfect. However, I don\'t wan
As Chandermani said, it is the default behavior, here is a example that shows it in action :
Is the input valid ? {{ myform.myinput.$valid }}
Input's value : {{ myvalue }}
{{ myvalue }} doesn't show anything until you write at least 4 characters in the input.
Best Regards.
EDIT
If you need a default value, I guess you could break down your value into 2 values, using a computed value :
var validNumber = 15;
$scope.validNumber = function () {
if ($scope.myform.myNumber.$valid) return $scope.myNumber;
else return validNumber;
};
I set up an example here : http://jsfiddle.net/7vtew/1/