0.0.2 • Published 9 years ago

ng-model-not-equal v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
9 years ago

Force different ng-model do not equal to each other by a key.

Use it like this:

<input type="text" ng-model="person1name" not-same-key="everyoneName">
<input type="text" ng-model="person2name" not-same-key="everyoneName">
<input type="text" ng-model="person3name" not-same-key="{{someVarInScope}}">
<input type="text" ng-model="person4name" not-same-key="{{someVarInScope}}">

Each person's name won't pass the validator(thus will have a ng-invalid in its class) once it equals to another's.