I have a function inside my angular controller that starts when i click a certain button on my html page. What i want to do is, basically, to print an error string under the button once a certain condition verifies. I already have a working check for the condition, but how would i go to print a string once the condition is verified?
This is the my incomplete code, what should i put inside the boolean check?:
$scope.functionName = function () {
var = $('#data_' + $scope.indiceSelezione).val().replace(/\//g, '');
if (data === undefined || data === '') {
if ($scope.response.result[$scope.index].flag === true) {
}
else {
$scope.change('CONVALIDATO');
};