2
I have a problem, I have a condition at the angle when my situation is PENDING, will disable two button.
$scope.situacaoParcelaPendente = "PENDENTE";
/*ultimo teste*/
if ($scope.resultSimulacao.ticlaa1VO.dscSituacaoParcela == $scope.situacaoParcelaPendente) {
//disabilitar btnSimular, etc
$scope.btnSimular.disabled = true;
} else {
//habilitar btnSimular
$scope.btnSimular.disabled = false;
}
So you didn’t solve why I have this variable. //$Scope.btnSimular.disabled = true;
– Di Boa
So Pedro, I’m doing it this way below, but it’s not working. $Scope.situatParcelaPendent = "PENDING"; var habilitaBotao = $Scope.resultSimulacao.ticla1VO.dscSituacaoParcela == situatParcelaPendent ? false : true; $Scope.habilitaBotao = habilitaBotao;
– Di Boa
You do not need to use another variable, just use a boolean variable in the ng-disabled property as quoted. You tried to do so?
– Pedro Camara Junior
You are accessing the second variable in the comparison incorrectly. You declared it so
$scope.situacaoParcelaPendente
and you’re wearing it like thissituacaoParcelaPendente
.– Pedro Camara Junior