Hi Nadia,
The answer is that the pristine state is only changed when the input itself updates the model, not when you update the model programmatically. This makes sense because otherwise, when you set the value of the model initially it would make the input dirty straight away.
If you want to make the input dirty programmatically you need to get hold of the input's ngModelController. The easiest way to do this, without writing a directive, is to note that by giving the form and the input's names they appear on the scope. So in the case of the following fiddle: scope.myForm.value1. Then you can do things like:
scope.myForm.value1.$setViewValue(...); // which will update the value and trigger the validation and dirty the input
or
scope.myForm.value1.$setDirty();
Here is the fiddle: