The Value of my text input is dynamic , and changed using Jquery , however everything looks fine at this part , but when i add an ng-model to this input so i can $watch the change of its value USING Angularjs , here i faced a problem ! simply the angular doesnt not detect the change of the input VALUE , and i dont know why ? , but when i change it manually the $watch work fine , any solution ??
my input :
<input type="text" data-ng-model="name">
$watch :
$scope.$watch('name',
function(newVal, oldVal, scope) {
if (newVal === oldVal) {
// This will run only on the initialization of the watcher
console.log("inisialisation");
} else {
console.log("changed");
// A change has occurred after initialization
}
});