ng-maxlength screws up my model

后端 未结 7 895
忘掉有多难
忘掉有多难 2020-12-08 02:17

I\'m trying to do a simple textarea with \"so many chars remaining\" along with validation. when I use ng-maxlength to validate my form, it resets my charcount as soon as th

7条回答
  •  心在旅途
    2020-12-08 02:55

    I think this should be logged as a bug on angular. It is not supposed to clear your model.I have a directive that links a dropdown select to a textbox and as soon as you insert a word that makes it go over the max-length then it clears my model and textbox.It is supposed to be a validator not clear your model when it thinks the model is invalid .

提交回复
热议问题