Input[type=email] is not reset on model reset #10027
Description
There's a bug with updating view values when an input of type email contains invalid content and its model is an objects' property.
A practical example is resetting an object using angular.copy with an empty object, like it's done in most examples in the Developer Guide, Chapter "Forms" (https://docs.angularjs.org/guide/forms).
I've created a plunk with simple instructions, which demonstrate the bug: http://plnkr.co/edit/cJgs2Nji79hxF1m5doRM?p=preview
The reason this happens, is that email inputs don't get their model values updated, if the content is invalid. Later when a model change happens, NgModelController determines the value via ngModelGet($scope); and compares this to ctrl.$modelValue (see this line:
angular.js/src/ng/directive/input.js
Line 2236 in 804e750
Both are undefined, in case you didn't enter any valid input before, and therefore the view value is not updated.
If noticed ctrl.$dirty is set to true, on the line above, so a simple fix could be to also ask if $dirty is true. But I can't estimate the performance hit, and can't help with tests as I'm still pretty new to angular internals.
Please help and verify, or tell me if I got something wrong.