You just need to use attr.$observeto access the value from one of the methods of binding code changes for the link function in
link: function (scope,elum,attr) {
attr.$observe('val', function(value) { console.log('scope', scope.val) })
if(scope.val) scope.val = scope.val.replace(/\d/g,'')
}
Find JsFiddle Update
source
share