javascript - angularjs $watch not work in my item -



javascript - angularjs $watch not work in my item -

<input ng-model="myinput" type="email" placeholder="recipient" />

controller :

$scope.myinput = 3; $scope.$watch('myinput', function() { console.log(1); });

when input in console.log(1),not work!

$watch execute if myinput has valid email value .if don't have valid email myinput seems undefined.that reason $watch not execute.so set valid email in field , check executing or not.

javascript angularjs watch

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -