ng-model-not-equal

0.0.2 • Public • Published

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.

Package Sidebar

Install

npm i ng-model-not-equal

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • yrbing