I have this 2 select options in my view and I need to set the second select value to "original" before disable it
<div class="form-group">
<label>Download mode:</label>
<select ng-model="properties.DownloadMode.PropertyValue" ng-change="EnableDisableDownloadFilePresets(properties.DownloadMode.PropertyValue)" class="form-control">
<option value="download" selected> Direct Download</option>
<option value="link"> Canto Link</option>
</select>
</div>
<div class="form-group">
<label>Download presets</label>
<select ng-model="properties.DownloadFilePresets.PropertyValue" ng-disabled="DownloadFilePresetsIsDisabled" class="form-control">
<option value="original" selected> Original</option>
<option value="all"> All file presets</option>
</select>
</div>
and this is my function
$scope.EnableDisableDownloadFilePresets = function (selectedValue) {
console.log(selectedValue);
if (selectedValue === "link") {
// set Download presets value to "original"
// disable Download presets
$scope.DownloadFilePresetsIsDisabled = true;
} else {
// enable Download presets
$scope.DownloadFilePresetsIsDisabled = false;
}
}