<!DOCTYPE html>
<html>
<head>
<script data-require="angular.js@1.5.6" data-semver="1.5.6" src="https://code.angularjs.org/1.5.6/angular.min.js"></script>
<script src="script.js"></script>
</head>
<body ng-app="MainModule" ng-controller="MainController">
<button ng-repeat="item in section1" type="button" ng-click="click1(item.label)">{{item.label}}</button>
<button ng-repeat="item in section2" type="button" ng-click="click2(item.value)">{{item.value}}</button>
<input type="text" value="{{combo[result.value1][result.value2]}}" />
</body>
</html>
angular.module('MainModule', [])
.controller('MainController', ['$scope', function($scope) {
$scope.result = {};
$scope.section1 = [{
label: 'label1'
}, {
label: 'label2'
}];
$scope.section2 = [{
value: 'one'
}, {
value: 'two'
}];
$scope.combo = {
"label1": {
"one": "result1",
"two": "result2"
},
"label2": {
"one": "result3",
"two": "result4"
}
};
$scope.click1 = function(value) {
$scope.result.value1 = value;
}
$scope.click2 = function(value) {
$scope.result.value2 = value;
}
}]);