SHARE
TWEET

Untitled

a guest Dec 16th, 2014 164 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <form>
  2.         <input type="text" ng-model="newEmail" />
  3.         <input type="text" ng-model="confirmEmail" ng-match="newEmail"
  4. </form>
  5.  
  6. app.directive('ngMatch'...
  7. require: 'ngModel',
  8. ...
  9. link: function(scope,element,attrs,ngModel) {
  10.          ngModel.$validators.passwordCharacters = function(value) {
  11.                 var newEmail = ////how to get newEmail model from the attribute////
  12.  
  13.                 return newEmail === value;
  14.         });
  15. }
  16. ...
  17. )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top