please help solve the problem. is a form of: jsfiddle
.if a user enters data into the fields:
name, email, phone, message
Then is output to the console.
but if a user adds a file to the field
attachment
, there is NO output to the console (should show "55555")
js:
briefApp.directive('attachmentValidate', function() {
return {
link: function($scope, element, attrs, ctrl) {
$scope.$watch('attachment', function(value){
console.log(55555);
});
}
};
});
I need to file when adding (or removing) operates the controller "attachmentValidate" and the console output "55555"