It is one of the basic problem, but if you search in google probably you will find a lot of solutions which is not related. When you have input field with getterSetter
, and you didn’t give the function name correctly then you will get this error:
TypeError: parsedNgModelAssign is not a function
at NgModelController.$$setOptions.ngModelSet (angular.js:20414)
at NgModelController.$$writeModelToScope (angular.js:20863)
at writeToModelIfNeeded (angular.js:20857)
at angular.js:20851
Example field:
<textarea
class="form-control"
name="test"
cols="5"
data-ng-model="ctrl.testGetterSetter(test)"
data-ng-model-options="{getterSetter:true}"
data-required>
</textarea>
Basicly this problem appears if data-ng-model="ctrl.testGetterSetter(test)"
can’t find the testGetterSetter
function.