angularjs - Adding watch to directive inner element.val() even without ngModel -


---html--- <input-wrap> <input type="text"/> </input-wrap>  ---js--- mymodule.directive('inputwrap',function(){    return{        restrict: 'e',        priority: 0,        link: function(scope,element,attr){            var myinput = element.find('input');            scope.$watch(myinput.val(),function(val){                  console.log('recipe now:'+val);            });        }    } }); 

i want without of on('change') , on('input') because value modified plugin used, , doesn't fire onchange , oninput events.

write watcher :

mymodule.directive('inputwrap',function(){ return{    restrict: 'e',    priority: 0,    link: function(scope,element,attr){        var myinput = element.find('input');        scope.$watch(function() { return myinput.val() },function(val){              console.log('recipe now:'+val);        });    }  } });