0

As you are using controllerAs syntax your value is not inside a scope you need to bind that value inside a scope
$scope.$watch(angular.bind(this, function () {
return this[attrs.ngModel]; // this will evaluate ng-model value from `this`
}), function (newVal, oldVal) {
var valid = !eleme...