See example here: https://jsfiddle.net/codefalling/u2mn764x/1/
<div ng-app>
<div ng-controller="TodoCtrl">
<input type="number" ng-model="value" size="30" >
<input type="button" ng-click="change()" class="btn-primary" value="TEST" >
</div>
</div>
function TodoCtrl($scope) {
$scope.change = function() {
$scope.value = null
}
}
When I type 10
into number input, click button, it turn to be empty.
However when I type a standalone e
or .
into number input, then click button, nothing happend. But $scope.value = 123
stills works.
So, Why view didn't get update(empty) in this situation?
Additional, is there any other way to empty it?