<select id="formType" class="form-control" name="formType" ng-model="currentMessage.formType" size="1" convert-to-number ng-change="formTypeChange()" ng-options="option.value as option.text disable when disabled for option in metaData.messageTypes"></select>and in the formTypeChange method I have the following code:
$scope.formTypeChange = function() { if ($scope.currentMessage.formType==3) // e-mail { $scope.currentMessage.recipients = $scope.selections.selectedGuests.filter(function (element) { return element.eMail!==""; }); $scope.metaData.messageTypes[2].disabled = $scope.currentMessage.recipients.length == 0; } else { $scope.currentMessage.recipients = $scope.selections.selectedGuests; } $scope.recipients.body.rows = $scope.currentMessage.recipients; }I can see that my recipients are properly filtered, but the e-mail option is not becoming disabled. Do you see what am I doing wrongly?