I'm using ng-model
in an input
tag, such as
<input ng-model="someModel" type="file" />
At some point in the execution I'm interested in disabling/removing the ng-model
so that the input
won't be affected anymore by changes to someModel
.
I've tried to select the input element and then apply element.removeAttr("ng-model")
but the element still seems to be reacting to changes to someModel
.
My guess is that this is happening due to the digest cycle. So how do I disable/remove the ng-model?