javascript - AutoFill chrome extension not updating the ng-model values -
i build small auto fill chrome extension using jquery. when click extension values updated in view of angular app. modal values not updated. how update modal values
in content.js have code like
$(document).ready(function(){ $.each($('body').find('input:visible'),function(data,element){ var arr=[]; (var = 0, attrs = element.attributes, n = attrs.length, arr = []; < n; i++){ $.each(valuefillers,function(d,e){ if(valuefillers[d].stringmatch.indexof(attrs[i].nodevalue.tolowercase())!=-1){ console.log(valuefillers[d].stringmatch) $(element).val(values[d]); settimeout(function () { $(element).triggerhandler('input'); }); } }); } }); })
how bind values ng-model. pls help
please see jquery documentation .trigger , .triggerhandler
http://api.jquery.com/triggerhandler/
http://api.jquery.com/trigger/
it says triggerhandler execute handlers added using jquery while .trigger execute hanlders. please try using .trigger method instead .triggerhandler
Comments
Post a Comment