Within my Angular view, there is a textarea set up like this:
<div class="form-group">
<label>Descrição</label>
<textarea name="area" ng-minlength="30" class="form-control" ng-model="produtos.descricao" id="descricao" type="text" placeholder="descricao"></textarea>
<span ng-if="check()">Caracteres restantes: {{produtos.descricao.length}}</span>
</div>
In the controller section, I have the following code:
$scope.produtos = [];
$scope.minLength = 30;
console.log($scope.minLength);
$scope.check = function(){
return ($scope.produtos.descricao.length < 30);
}
If the check returns true, shouldn't the ng if condition work?