SHARE
TWEET

Untitled

a guest May 23rd, 2016 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function vEqualsDirective($parse){
  2.     return {
  3.         restrict : 'A',
  4.         require : 'ngModel',
  5.         link : function(scope, element, attrs, ngModel){
  6.             ngModel.$validators.vEquals = function(value){
  7.                 console.log("value : " + value);
  8.                 console.log("attrs.vEquals : " + attrs.vEquals);
  9.                 console.log("scope : " + scope);
  10.                 return value===$parse(attrs.vEquals)(scope);
  11.             }
  12.         }
  13.     };
  14. }
  15.  
  16. eCollectionModule.directive('vEquals',['$parse',vEqualsDirective]);
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