ng-input hold $viewValue instead of $modelValue

I had some trouble using ng-input for resetting to old value when user press ESC.

I found out that ng-input was storing the initial $modelValue and calling $setViewValue with it when user pressed ESC. This was causing trouble with my input validation, since my view value is different from my model value.

So I changed the ng-input to store the $viewValue instead of $modelValue.

Hope it helps.