Hi Pats,
There are multiple ways to accomplish that. Without knowing what way your
3rth party works, brute-force is the easiest. If it's a single/few things
you need to watch this might be okay in your situation.
Here is a directive that monitors value changes on a element that hosts a
value property:
function myChangeDir($interval) {
return {
restrict: 'A',
scope: {
myChange: '&'
},
link: linkFn
};
function linkFn(scope, elm, attrs) {
let old = null;
let el = elm[0];
$interval(function () {
if (el.value !== old) {
scope.myChange({value: el.value});
old = el.value;
}
},50)
}
}
If you know something more, you can use events to catch changes, this will
be more elegant. (and quicker!)
you can see it in action in this plunk
<http://plnkr.co/edit/cieTPuUdCFen3QZdcjZA?p=preview>
Regards
Sander
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.