angular.module('myApp', [])
.controller('myCtrl', ['$scope', function($scope) {
$scope.diskSizes = [{
"label": "100GB",
"value": 100
},
{
"label": "250GB",
"value": 250
},
{
"label": "500GB",
"value": 500
},
{
"label": "1TB",
"value": 1000
},
{
"label": "1.5TB",
"value": 1500
}
]
$scope.saveData = function() {
let val = $scope.disk_size;
let lab = $scope.diskSizes.filter(f => f.value == val)[0].label;
console.log(lab, val)
}
}]);
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.5/angular.min.js"></script>
<div ng-app="myApp" ng-controller="myCtrl">
<select ng-model="disk_size" ng-change="saveData()">
<option ng-repeat="item in diskSizes" value={{item.value}}>{{item.label}}</option>
</select>
</div>