varwatch=$scope.$watch('name',function(newValue,oldValue,scope){console.log(newValue);console.log(oldValue);});